Written by James McDonald

March 16, 2010

If you edit the cache_mgr value in /etc/squid/squid.conf you can set an email address which will appear as the contact point in any error messages that Squid returns to it’s browser clients. However this doesn’t allow you to have different link text that is displayed when you get an error.

For example you may want to have a mailto: link with the contact email address and “Please Phone IT Support on 02 5555 XXXX or click here to email them” as the link text.

Please phone IT Support on 02 5555 XXXX or click here to email them

To customize the Squid errors you need to edit the Squid error template files.

On Ubuntu they are located in “/usr/share/squid/errors/English” (replace English with your specific Language).

Using the Squid error message you receive in your browser search in the the above directory until you find it.

I wanted to change the error message returned when a connection is refused or fails. This is located in the file ERR_CONNECT_FAIL file in the above mentioned directory

Opening this fiile in vi (as root or using sudo) allowed me to change the text:

The remote host or network may be down. Please try the request again.

Your cache administrator is Your Special Link Text Here.

So instead of having a an email address only, you can add a descriptive peice of link text like “Your Company Name IT Support” and the mailto: link will be whatever you have set in the cache_mgr value in squid.conf


Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…