Re: [squid-users] Creating an Out of Service Page using Custom Errors

From: Amos Jeffries <squid3@dont-contact.us>
Date: Sat, 01 Mar 2008 22:14:09 +1300

Mark A. Schnitter wrote:
> Hello,
>
> I'm attempting to create an Out of Service page hosted on the same box
> that is running Squid. I'm running a reverse proxy configuration with
> several backend boxes. When one of the backend boxes is down for scheduled
> maintenance or is having a problem, I would like to have a custom html
> page displayed to indicate the problem instead of a Squid proxy error
> page.
>
> I've searched through the mail archives, Google, etc. and have found lots
> of good info around how to display a custom page, but so far the only way
> to trap or trigger the page seems to be confined to creating an ACL that
> looks for specific information to display the page. I've researched the
> error_map and deny_info tags and haven't been able to find a way to
> trigger the custom page when I get a squid error.
>
> For example, if my Windows box is up, but IIS is down, Squid returns an
> error code 111. The error_map tag only seems to accept HTML response codes
> so I'm out of luck with that approach. If I try to use deny_info, I can't
> find an ACL tag that allows me to identify Squid errors.
>
> I would like to identify the following two conditions: Target box is down
> and Target Box is up, but web server is down.
>
> If there was a way I could trap the errors Squid was producing without
> changing the default error messages, that would be the ideal solution.

You may need to us squid 3.0 with its status ACL and deny_info to get
this working. If that still cannot do it then you are likely to end up
with a code change needed.

>
> Hypothetical Example:
>
> acl oos squid-error 111
> deny_info ERR_OOS oos
> - Where squid-error is the trapping mechanism
> - Where ERR_OOS is the custom error page
>
> Any ideas or different approaches?
>
> Thanks,
> Mark
>

Amos

-- 
Please use Squid 2.6STABLE17+ or 3.0STABLE1+
There are serious security advisories out on all earlier releases.
Received on Sat Mar 01 2008 - 02:13:46 MST

This archive was generated by hypermail pre-2.1.9 : Tue Apr 01 2008 - 13:00:04 MDT