Bug 984116 - "ProxyErrorOverride On" does not work in mod_proxy_ajp
Summary: "ProxyErrorOverride On" does not work in mod_proxy_ajp
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss Enterprise Web Server 2
Classification: JBoss
Component: httpd
Version: 2.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER01
: 2.1.0
Assignee: Weinan Li
QA Contact: Libor Fuka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-12 20:59 UTC by Masafumi Miura
Modified: 2019-06-13 12:09 UTC (History)
5 users (show)

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.
Clone Of:
Environment:
Last Closed: 2019-06-13 12:09:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Apache Bugzilla 50945 0 None None None Never
Red Hat Bugzilla 694939 0 medium CLOSED mod_proxy_ajp does not honor "ProxyErrorOverride" 2021-02-22 00:41:40 UTC

Description Masafumi Miura 2013-07-12 20:59:59 UTC
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 14:02:29 UTC
Fixed in httpd-2.2.23

Comment 3 Weinan Li 2014-05-30 07:01:59 UTC
Fixed in httpd 2.2.26

Comment 4 Libor Fuka 2014-06-09 13:00:39 UTC
Verified with 2.1.0-ER2 build:
Win x86_64
Win 686

Comment 5 Libor Fuka 2014-06-09 14:19:49 UTC
Solaris SPARC
RHEL7
RHEL6 x86_64

Comment 6 Libor Fuka 2014-06-13 10:09:44 UTC
Verified on EWS 2.1.0-ER2 on Solaris x86, x86_64.

Comment 7 Libor Fuka 2014-06-16 11:59:36 UTC
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 07:24:17 UTC
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 08:40:59 UTC
Verified on EWS 2.1.0-ER3 on MS Windows and Solaris

Comment 12 Michal Karm Babacek 2014-08-19 08:44:43 UTC
o.k., dist diff


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