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.
Related Posts by Tags: cache, change, default, document, error, Linux, page, proxy, server, squid