https://issues.apache.org/bugzilla/show_bug.cgi?id=45434
Summary: ProxyPassReverse and balancer:// don't play nice
Product: Apache httpd-2
Version: 2.2.9
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: All
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
I believe there's an issue with how ProxyPassReverse handles redirects in
conjuction with mod_proxy_balancer.
See below for an example configuration which details the setup.
The browser requests /foo from the Apache HTTPd frontendserver. The frontend
server forwards the request to one of the balancer member servers (backend
servers).
The backend server decides /myservice/foo is a directory and redirects to
/myservice/foo/
The browsers get the following Location: header back:
Location: http://example.net/myservice/foo/
>From the below configuration you'd expect it to be just
"http://example.net/foo/", with "/myservice" zapped. That's at least how things
work when you're not using mod_proxy_balancer (see "Demo 3" below) at all.
An example configuration which details the issue in two ways with
mod_proxy_balancer (demo 1 and 2) and one example which doesn't use
mod_proxy_balancer and provides the expected result (demo 3)
<VirtualHost *>
ServerName example.net
# Demo 1: The following does not work:
ProxyPass /
balancer://mycluster/myservice/ stickysession=JSESSIONID|jsessionid
nofailover=On
ProxyPassReverse / balancer://mycluster/myservice/
<Proxy balancer://mycluster>
BalancerMember http://tomcat1.example.net:8180
BalancerMember http://tomcat2.example.net:8180
</Proxy>
# Demo 2: ..and neither does this
ProxyPass / balancer://mycluster/
stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse / balancer://mycluster/
<Proxy balancer://mycluster>
BalancerMember
http://tomcat1.example.net:8180/myservice/
BalancerMember
http://tomcat2.example.net:8180/myservice/
</Proxy>
# Demo 3: This works though (but we can't do LB)
ProxyPass /
http://tomcat1.example.net:8180/myservice/
ProxyPassReverse / http://tomcat1.example.net:8180/myservice/
</VirtualHost>
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]