0

we have apache load balancing configuration like so:

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

#ProxyPassReverse / balancer://acluster
ProxyPassReverse / ajp://10.10.10.1:8123
ProxyPassReverse / ajp://10.10.10.2:8123

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

0

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 "http://192.168.1.50:80"
    BalancerMember "http://192.168.1.51:80"
</Proxy>
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.

1
  • 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.