Bug 984116 - "ProxyErrorOverride On" does not work in mod_proxy_ajp
"ProxyErrorOverride On" does not work in mod_proxy_ajp
Status: VERIFIED
Product: JBoss Enterprise Web Server 2
Classification: JBoss
Component: httpd (Show other bugs)
2.1.0
Unspecified Unspecified
unspecified Severity unspecified
: ER01
: 2.1.0
Assigned To: Weinan Li
Libor Fuka
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-12 16:59 EDT by Masafumi Miura
Modified: 2015-03-01 23:02 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
In JBoss Enterprise Web Server, <literal>ProxyErrorOverride On</literal> does not work when used with the mod_proxy_ajp module. When accessing a 404 URL in the <filename>/app</filename> context, a 404 page is displayed from the back end servers such as Tomcat, JBoss Enterprise Application Platform, etc. This is fixed in JBoss Enterprise Web Server 2.1 and works as expected.
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 694939 None None None Never
Apache Bugzilla 50945 None None None Never

  None (edit)
Description Masafumi Miura 2013-07-12 16:59:59 EDT
Description of problem:

* "ProxyErrorOverride On" does not work if used with mod_proxy_ajp module. When I access a 404 URL in the /app context, which is proxied with AJP, I get a 404 page from backend servers (Tomcat, JBoss EAP, and so on). 
* Accessing 404 URLs via non-proxied content works as intended, as defined in "ErrorDocument". 
* It works in mod_proxy_http (i.e. changing protocol to ajp to http).

[ Config Snippet ]
~~~
ProxyPass /app/  ajp://127.0.0.1:8009/app/
ProxyErrorOverride On
ErrorDocument 404  /error/404.html
~~~

Version-Release number of selected component:

* JBoss EWS 2.0.1 (httpd-2.2.22)


How reproducible:

Everytime.


Steps to Reproduce:

1. Define "ErrorDocument" and enable "ProxyErrorOverride" on mod_proxy_ajp setting. For example:

    ProxyPass /app/  ajp://127.0.0.1:8009/app/
    ProxyErrorOverride On
    ErrorDocument 404  /error/404.html

2. Access a 404 URL via definied "ProxyPass" context

    curl -v http://localhost/app/foobar
  

Actual results:

* 404 error from backend (proxied) server.


Expected results:

* 404 error as defined in "ErrorDocument" via Apache httpd.


Additional info:

* There is an Apache BZ https://issues.apache.org/bugzilla/show_bug.cgi?id=50945 and a fix http://svn.apache.org/viewvc?view=revision&revision=1087864 for this issue in upstream.
* There is a Red Hat BZ#694939 for Apache httpd in RHEL 6. And it has been fixed in Apache httpd rpm package httpd-2.2.15-15 included in RHEL 6.2.
Comment 2 Jean-frederic Clere 2014-02-13 09:02:29 EST
Fixed in httpd-2.2.23
Comment 3 Weinan Li 2014-05-30 03:01:59 EDT
Fixed in httpd 2.2.26
Comment 4 Libor Fuka 2014-06-09 09:00:39 EDT
Verified with 2.1.0-ER2 build:
Win x86_64
Win 686
Comment 5 Libor Fuka 2014-06-09 10:19:49 EDT
Solaris SPARC
RHEL7
RHEL6 x86_64
Comment 6 Libor Fuka 2014-06-13 06:09:44 EDT
Verified on EWS 2.1.0-ER2 on Solaris x86, x86_64.
Comment 7 Libor Fuka 2014-06-16 07:59:36 EDT
Verified on EWS 2.1.0-ER2 on MS Windows 2008 i686, x86_64, 2008R2, 2012
and
Solaris SPARC
Comment 8 Michal Haško 2014-06-19 03:24:17 EDT
VERIFIED on EWS 2.1.0-ER2 on:
RHEL5 (i386, x86_64), RHEL6 (i386, x86_64) and RHEL7 (x86_64)
OpenJDK (1.6, 1.7), OracleJDK (1.6, 1.7) and IBMJDK(1.6, 1.7)
Comment 10 Libor Fuka 2014-06-24 04:40:59 EDT
Verified on EWS 2.1.0-ER3 on MS Windows and Solaris
Comment 12 Michal Karm Babacek 2014-08-19 04:44:43 EDT
o.k., dist diff

Note You need to log in before you can comment on or make changes to this bug.