Search squid archive

Re: squid 3.2 and error_map equivalent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25/03/2013 10:55 p.m., Martin Sperl wrote:
OK, this seems a reasonable enough approach (but not ideal with the redirect) - I will give it a try.

There is no redirect unless you specify an external URL location in deny_info. Use a static template / filename at that will be injected as the delivered object.


In the latest Squid you can supply an alternative 4xx error code and a template in deny_info.
ie.   deny_info 499:/etc/squid3/Kittens all

The primary use is that we want to catch the icap errors (in case the icap-server is down) or "502 - Bad gateway"...

An additional question: how can I detect if the 502/... have been generated by squid and not by the upstream servers? (so that the error page redirect only happens in those cases)

That is an entirely different problem to the one you have been talking about so far.

To replace just the page Squid is generating you do not have to configure anything. Just remove all the installed errors/*/ERR_BAD_GATEWAY translation files, and replace the errors/templates/ERR_BAD_GATEWAY one with your custom static page. You can optionally provide translated versions of your custom page too of course.

Amos




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux