Hi,
We would like to return site-specific error messages to visitors when
the back-end server cannot be reached. For example, we have all our web
sites pointing to the reverse proxy, which then passes through to our
back-end web server.
The sites run under different brand-names however and as such, when the
back-end server fails and the 503 error is returned by Pound, we would
like to be able to choose which error page is returned, determined by
the hostname, to ensure the correct branding.
We currently have the following in the pound.cfg file:
Err503 "/usr/local/errors/pound_ri.503"
However, this is a top-level directive and cannot, as far as we are
aware, be placed within a UrlGroup directive. It would be nice to be
able to do something like this:
UrlGroup ".*"
HeadRequire Host ".*ajt.*"
BackEnd 192.168.1.1,80,1
Err503 "/usr/local/errors/pound_ajt.503"
EndGroup
However doing that at present results in the last Err503 statement in
the config file being used for all UrlGroups.
Is this a possibility for inclusion?
Also, I have read the previous posts regarding a preference of 0 on
back-end servers. This would mean that the 0 preference server would
never be contacted unless all other servers in that UrlGroup were
unavailable.
This would help us with the above issue if it were a possibility to do
this, since we could redirect requests to a different back-end server
which could determine the hostname and return the appropriate "site
unavailable" page, i.e.:
UrlGroup ".*"
HeadRequire Host ".*ajt.*"
BackEnd 192.168.1.1,80,1
BackEnd 192.168.1.2,80,0
EndGroup
The server 192.168.1.2 would *only* be contacted if the 192.168.1.1
server was unavailable, then 192.168.1.2 could return the error page,
branded depending on the URL.
Your thoughts would be appreciated.
[...]
|