When defining more than 1 proxy balancers the system sometimes ignores configurations and takes the first balancer for all requests. ErrorLog and configtest say everything is ok, the effect seems to be depending of the order of configuration The following configuration doesn't work <VirtualHost xxx.xxx.xxx.xxx> <Proxy balancer://cluster1> BalancerMember http://10.x.x.x loadfactor=20 retry=60 BalancerMember http://10.x.x.y loadfactor=10 retry=60 </Proxy> <Proxy balancer://cluster2> BalancerMember http://10.x.x.x:8080 loadfactor=20 retry=60 BalancerMember http://10.x.x.y:8080 loadfactor=10 retry=60 </Proxy> RewriteEngine on RewriteRule ^/specialpath/(.*)$ balancer://cluster2/specialpath/$1 [NC,P,L] RewriteRule ^/(.*)$ balancer://cluster1/$1 [P,L] </VirtualHost> Every request to specialpath is routed to the webs linked in cluster1 If I change the sequence of the 2 balancers it works <VirtualHost xxx.xxx.xxx.xxx> <Proxy balancer://cluster2> BalancerMember http://10.x.x.x:8080 loadfactor=20 retry=60 BalancerMember http://10.x.x.y:8080 loadfactor=10 retry=60 </Proxy> <Proxy balancer://cluster1> BalancerMember http://10.x.x.x loadfactor=20 retry=60 BalancerMember http://10.x.x.y loadfactor=10 retry=60 </Proxy> RewriteEngine on RewriteRule ^/specialpath/(.*)$ balancer://cluster2/specialpath/$1 [NC,P,L] RewriteRule ^/(.*)$ balancer://cluster1/$1 [P,L] </VirtualHost> Balancer Manager Webpage shows both clusters, but in case 1 the ports of cluster 2 are "lost", in case 2 it is shown correctly with port 8080 With 3 or more backend clusters this issue would be even more complicated to test
Could you please give the attached patch a try? It should fix your problem.
Created attachment 19092 [details] Patch against trunk
Thanks, the Patch fixes the problem
Committed to trunk as r481901 (http://svn.apache.org/viewvc?view=rev&rev=481901).
Proposed for backport as r571936 (http://svn.apache.org/viewvc?rev=571936&view=rev).
Backported to 2.2.x as r572420 (http://svn.apache.org/viewvc?rev=572420&view=rev).