Squid : Custom error page

หน้าตาสำหรับแสดงผลกรณีมี error ของ squid เช่น กรณีถูกบล็อก(ERR_ACCESS_DENIED) แก้ไขได้ที่ /usr/share/squod/errors/
โดยสามารถใช้ Variable ได้ด้วย ดังนี้
%B URL with FTP %2f hack
%c Squid error code
%d seconds elapsed since request received (not yet implemented)
%e errno
%E strerror()
%f FTP request line
%F FTP reply line
%g FTP server message
%h cache hostname
%H server host name
%i client IP address
%I server IP address
%L contents of err_html_text config option
%M Request Method
%m Error message returned by external auth helper
%p URL port
%P Protocol
%R Full HTTP Request
%S squid default signature
%s caching proxy software with version
%t local time
%T UTC
%U URL without password
%u URL with password (Squid-2.5 and later only)
%w cachemgr email address
%z dns server error message
ตัวอย่าง ERR_ACCESS_DENIED
1 2 3 4 5 6 7 8 9 10 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF8"> <TITLE>ERROR: The requested URL could not be retrieved</TITLE> <STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE> </HEAD><BODY bgcolor="#000000"> <div align="center"> <img src="http://intranet.sci.com/sci/blocked.jpg" border="0" alt="Access dinied"> </div> <br> <div align="center">Web นี้ถูก block ในช่วงเวลา 8:00-12:00 น. และ 13:00-17:40 น. หากมีความจำเป็นต้องใช้งาน กรุณาแจ้ง งทส.</div> |
Written by Komkid on January 28th, 2010 with no comments.
Read more articles on Admin and Networking and Programming and Ubuntu.