Bug 45843

Summary: mod_proxy_ajp and proxypassreverse directive
Product: Apache httpd-2 Reporter: Andre Steingress <andre.steingress>
Component: mod_proxyAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED INVALID    
Severity: normal    
Priority: P2    
Version: 2.2.9   
Target Milestone: ---   
Hardware: PC   
OS: Windows Server 2003   

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).