On Tue, 2010-01-19 at 16:54 -0800, Jeff Tharp wrote: > That does fix this issue, but the browser still gets a 200 instead of a 404. > I know that's caused some confusion for our operation as well. Think about > SEO here -- we have a site behind an Apache-based reverse proxy. We want to > use ProxyErrorOverride and ErrorDocument to make sure we send proper error > pages no matter what the backend application spits out (because often times > its more like a stack trace than a nice human-readable page). Yet, if we > trigger a 404, we send a 200 back, which of course means a search engine > crawler misses the original 404. I need ProxyErrorOverride on to deal with > the 500/503 type errors from the backend. And thus I can't send a nice 404 > from the backend, because the proxy will still override it. So how do I > return a clean 404 in that scenario?
Thats annoying - I'd only been looking at the logs since that was what I was worried about, but now you mention it, returning a 404 to the client is just as important :/ Mark. > Jeff Tharp, System Administrator ESRI - Redlands, CA > http://www.esri.com > > -----Original Message----- > From: Mark Watts [mailto:[email protected]] > Sent: Tuesday, January 19, 2010 1:12 AM > To: [email protected] > Subject: Re: ErrorDocument and ProxyErrorOverride > > > > 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. > > Bingo! > > I do indeed have %>s in my LogFormat, which I'd never noticed before > (ahh, the joys of cut 'n paste) > > Thanks for this. > > Mark. > -- Mark Watts BSc RHCE MBCS Senior Systems Engineer, Managed Services Manpower www.QinetiQ.com QinetiQ - Delivering customer-focused solutions GPG Key: http://www.linux-corner.info/mwatts.gpg
signature.asc
Description: This is a digitally signed message part
