SetEnvIf ^Cookie$ "MYCOOKIE=([^ ;]*)" MYCOOKIE=$1
Header add Set-Cookie "MYCOOKIE=%{UNIQUE_ID}e.%{BALANCER_WORKER_ROUTE}e; path=/" env=!MYCOOKIE
ProxyPass /RootURI balancer://Cluster stickysession=MYCOOKIE nofailover=Off
http://Server1:Port1/RootURI
<Proxy balancer://Cluster >
BalancerMember route=host1
http://Server2:Port2/RootURI
BalancerMember route=host2
http://Server1:Port1/RootURI
</Proxy>
ProxyPassReverse
ProxyPassReverse
http://Server2:Port2/RootURI
2) Please, could you explain me why with Apache 2.2.4 the following statefull syntax is wrong:
ProxyPass /RootURI balancer://Cluster stickysession=JSESSIONID nofailover=Off
<Proxy balancer://Cluster >
BalancerMember http://Server1:Port1/RootURI
http://Server2:Port2/RootURI
BalancerMember
</Proxy>
Apache 2.2.4 does not take into account the parameter JSESSIONID
and the observed behavior is the same as a stateless load balancing.
Thanks in advance & have a good day.
Best regards Olivier.