Hide Forgot
Description of problem: "ProxyErrorOverride On" does not work if used with mod_proxy_ajp. [ Config Snippet ] <Proxy *> AddDefaultCharset Off Order deny,allow Allow from all </Proxy> ProxyErrorOverride On <Proxy balancer://ajpCluster> BalancerMember ajp://somehost1:9324 route=s1 loadfactor=100 retry=10 BalancerMember ajp://somehost2:9324 route=s2 loadfactor=90 retry=10 ProxySet lbmethod=byrequests ProxySet stickysession=JSESSIONID </Proxy> ProxyPass /static balancer://ajpCluster/static ErrorDocument 404 /index404.html DocumentRoot "/opt/static/error/" <Directory /opt/static/eror/> Order allow,deny Allow from all </Directory> When I access a 404 URL in the /static context, which is proxied with AJP, I get a 404 page from Tomcat. Accessing 404 URLs via non-proxied content works as intended, as defined in "ErrorDocument". Version-Release number of selected component (if applicable): httpd-2.2.15-5.el6 How reproducible: Everytime. Steps to Reproduce: 1. Define "ErrorDocument" 2. Enable "ProxyErrorOverride" 3. Access 404 URL via definied "ProxyPass" context Actual results: 404 error from backend (proxied) server Expected results: 404 error as defined in "ErrorDocument" via Apache Additional info: Bug originally filed in 2007 via Apache Bugzilla. It looks like this bug has still not been corrected as of the latest upstream version of Apache. https://issues.apache.org/bugzilla/show_bug.cgi?id=41278 There is a proposed patch but may not be complete (e.g. no special handling of code 401, etc...). Please see comment #1 in the original Apache BZ for more information.
Created attachment 490898 [details] Original proposed patch from Jim Riggs Jim Riggs 2009-03-04 20:24:03 EST Attached is an initial patch that provides this functionality. It may not be complete (e.g. it doesn't do any special handling for 401 like mod_proxy_http does), and I make no claims to be an expert in the Apache code, so it may not be complete or 100% correct. That said, though, I have been using this patch for some time with no issues.
Created attachment 490899 [details] Patch against httpd-2.2.15-5.el6 src RPM
Since RHEL 6.1 External Beta has begun, and this bug remains unresolved, it has been rejected as it is not proposed as exception or blocker. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
Comment on attachment 490899 [details] Patch against httpd-2.2.15-5.el6 src RPM Reversed
There is a fix for this upstream: http://svn.apache.org/viewvc?rev=1087864&view=rev
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1630.html