Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to implement custom authenticator for Squid by having something like

auth_param basic program

in the /etc/squid3/squid.conf file. It all works fine, but I want to make an improvement.

The responsibility of is quite simple: Squid sends user name and password, and expects either OK or ERR back.

The improvement I want to make is to explain users why they have been denied the service, e.g.

ERR You have been browsing too much, come back in 24 hours

According to Squid documentation, this is quite possible:

"ERR" responses may optionally be followed by a error description available as %m in the returned error page.

Can anyone explain what does %m stand for? I have been trying to print a simple text after ERR (without quotes, as shown above) but this text doesn't appear in the browser pop up. Any ideas?

share|improve this question
up vote 1 down vote accepted

The %mis used to insert your custom message into the error page that your user sees when squid responds to them. To use it, find out where the squid template error pages are for the language you are using. On my Ubuntu system the English error pages are located at


Each of the files is a template html file that you can modify to meet your own needs or you can write your own. To test this I modified my ERR_CACHE_ACCESS_DENIED e.g.


which displays the message returned by the custom authentication script on the ERR line.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.