httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sorin Manolache <sor...@gmail.com>
Subject Re: ErrorDocument and ProxyErrorOverride
Date Mon, 18 Jan 2010 19:01:04 GMT
On Mon, Jan 18, 2010 at 18:50, Mark Watts <m.watts@eris.qinetiq.com> wrote:
>
> [I originally sent this to users@ but here might be a better place to
> ask]
>
>
> I have a two Apache 2.2.13 servers. One is a straight proxy (doing SSL
> offload) through to the other.
>
> The proxy has the following settings relating to my issue:
>
>
>        ErrorDocument 404 /errors/error404.html
>        ProxyErrorOverride on
>
>        ProxyPass        /  http://192.168.1.1/
>        ProxyPassReverse /  http://192.168.1.1/
>
>
> This means 404's caused by content not existing on the back-end server
> are captured by the proxy, which in turn pulls the page from the
> back-end server. (The real configuration is more complicated, since in
> reality I'm proxying another location to some IIS boxes, and they don't
> have the customised error page).
>
> I'm under the impression from the ErrorDocument documentation
> (http://httpd.apache.org/docs/2.2/mod/core.html#errordocument) that my
> custom 404 page should be being returned, while retaining the 404 status
> code since I'm not technically redirecting it to another server from the
> client PoV.
> Indeed, testing this locally (without a proxy) returns me a customised
> page and a 404 status code.
>
>
> Does this still hold when your ErrorDocument is actually behind a proxy?
> Testing here suggests not - I'm getting the custom page but with a 200.
> Naturally, this means that logs from the proxy never include 404's,
> which isn't the case. (I can't really use logs from the back-end server,
> since they don't reflect the true source IP).

What appears in the log file of the proxy depends on how the access
log line is configured.

Have a look here
http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#formats

If you have %s in your CustomLog directive, you'll log the 404. If you
have %>s you'll log the 200.

S



-- 
A: Because it reverses the logical flow of conversation.
Q: Why is top-posting frowned upon?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

Mime
View raw message