Bug 45843 - mod_proxy_ajp and proxypassreverse directive
Summary: mod_proxy_ajp and proxypassreverse directive
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy (show other bugs)
Version: 2.2.9
Hardware: PC Windows Server 2003
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2008-09-19 04:36 UTC by Andre Steingress
Modified: 2008-09-19 05:46 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Andre Steingress 2008-09-19 04:36:18 UTC
tomcat version: 5.5.25 (jdk 1.6_07)

we have the following two lines in our virtual host config:

ProxyPass /xxx/ ajp://tomcat:8009/
ProxyPassReverse /xxx/ ajp://tomcat:8009/

After every succesful user-login a 302 redirect is sent by the j2ee application that redirects to "/views/mainview.do". The problem is, that the ProxyPassReverse directive does not seem to work correctly in this case, e.g.:

The original location attribute of the 302 HTTP response

Location: http://somehost/views/mainview.do

should be replaced by

Location: http://somehost/xxx/views/mainview.do

but actually is 

Location: http://somehost/views/mainview.do

Whenever using mod_proxy with HTTP instead of AJP the URI prefix "xxx" is inserted correctly, so we assume there could be a problem in mod_proxy_ajp.
Comment 1 Ruediger Pluem 2008-09-19 05:46:30 UTC
Bugzilla is no user support forum. This is a misconfiguration on your side.
You need to use

ProxyPassReverse /xxx/ http://somehost/

instead (in fact the same ProxyPassReverse you use with mod_proxy_http but without port).