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

2008-03-01 Thread Amos Jeffries

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.


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

2008-02-29 Thread Mark A. Schnitter
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.

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