we have apache load balancing configuration like so:

<Proxy balancer://acluster>
BalancerMember ajp:// route=r1
BalancerMember ajp:// route=r2
ProxyPass / balancer://acluster

#ProxyPassReverse / balancer://acluster
ProxyPassReverse / ajp://
ProxyPassReverse / ajp://

I am trying to find out, what is the purpose or effect of having those multiple ProxyPassReverse entries instead of using that line which was commented out. Thank you


TL;DR: Just use the ProxyPassReverse / balancer://acluster.

There is no purpose with those separate ProxyPassReverse lines as the Apache Module mod_proxy_balancer gives example configuration with ProxyPassReverse referencing the balancer://:

<Proxy "balancer://mycluster">
    BalancerMember ""
    BalancerMember ""
ProxyPass        "/test" "balancer://mycluster"
ProxyPassReverse "/test" "balancer://mycluster"

The documentation for ProxyPassReverse Directive does not specify what would happen with multiple ProxyPassReverse directives. In the worst-case, requests for a balancer member might have the rewritten Host header of another balancer member. It depends on the configuration of the backend server whether this causes problems or not.

Also, if the current configuration with separate lines was valid, it would not be an easily manageable solution as it would require an additional update for the ProxyPassReverse configuration every time you add a BalancerMember.

  • Thank you, i was thinking that its maybe so the request made via reverseProxy do not go through the cluster. Its a strange one – Michal Jul 22 at 19:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.