You Are Here: Home » Articles » How-To » Linux » OS » Web

How to change the default error document pages in Squid?

By on September 16th, 2009 
Advertisement

squid-error-document Squid is one of the best caching web proxy servers out there. Although it provides a number of  amazing features but the default error page which is served by Squid is very basic and does not look good. So if you are a system administrator you may like to customize or change the default error document according to your own needs. In this article we will tell you how to do so.

All the error documents for a “default” Squid installation are located inside the directory: /usr/share/squid/errors/English/. So in case you want to modify any of the basic default error documents (error pages) like the access denied error page then you should edit the ERR_ACCESS_DENIED file in the above directory.

You can also choose to show different types of error pages (error documents) to different groups of users. This is possible only if your are denying access to a particular user group (ACCESS_DENIED). This feature is not available for other error messages. This can be done by adding the following directive to your SQUID configuration file which is generally located at /etc/squid/squid.conf:

deny_info ERR_PAGE_NAME acl

You custom error document page should have the prefix ERR_ before it’s name and must be stored in the /usr/share/squid/errors/English/ directory, else this feature won’t work. You may also like to read about how to configure acl in squid.

Advertisement



Related Posts by Tags: , , , , , , , , ,





How to change the default error document pages in Squid? was originally published on Digitizor.com on September 16, 2009 - 12:38 am (Indian Standard Time)