Hi Zisis,
Am 06.09.2012 08:07, schrieb Zisis Lianas:
Tom, thanks for your feedback.
The main difference between our configurations is that you do
ProxyPassReverse the single BalancerMember (http://app05/...),
which is also working for me - in my configuration I ProxyPassReverse
the "balancer://cluster". And this is the configuration which does
not work correctly.
So...
ProxyPassReverse / http://app05/ => WORKS
ProxyPassReverse / balancer://cluster/ => DOES NOT WORK CORRECTLY
As documented the balancer://... ProxyPassReverse should work:
http://httpd.apache.org/docs/2.4/mod/mod_proxy_balancer.html#example
So I think this is a bug.
As Tom confirmed, this is a bug not with ProxyPass but with
ProxyPassReverse, which I also tried to report as issue #51489 (thanks
for mentioning it). I already traced it down with gdb to one particular
code path that seems to be broken. Checkout my most recently patch
attached to issue #51489 for details.
Jim, you asked what exactly DOES NOT WORK CORRECTLY mean, I will try to
describe that again in my own words. It means that ProxyPassReverse does
its job, but adds an additional slash to the redirect target URL, which
is inserted after the hostname. E.g. if the HTTP response from backend
with status code 301 contains a Location header like this:
Location: http://backend01.foo:5080/clusterjsp/
then the HTTP response from reverse proxying Apache after processing the
ProxyPassReverse configuration would look like this:
Location: http://mydomain.foo:8080//clusterjsp/
^--- this slash shouldn't be there
If you leave out the trailing slash in the ProxyPassReverse directive,
Apache is unable to process the request (HTTP 500 error mentioned by
Zisis) due to the broken configuration. If the ProxyPassReverse
configuration matches the ProxyPass configuration, you get the
additional slash.
As I wrote already above, I analyzed the code flow already and
identified where in the code the problem exists. Apparently the corner
case is hit when the destination URL in ProxyPassReverse has a
slash-only path component (i.e. '/').
The available patch attached to issue #51489 should fix the issue,
however someone more familiar with the Apache code should probably
review the patch before applying it in SVN.
Regards,
Micha