Skip to content

Instantly share code, notes, and snippets.

@skarllot
Last active August 29, 2015 14:22
Show Gist options
  • Select an option

  • Save skarllot/94dcd0c4e8e8200404b7 to your computer and use it in GitHub Desktop.

Select an option

Save skarllot/94dcd0c4e8e8200404b7 to your computer and use it in GitHub Desktop.
Apache proxy balancer
<VirtualHost *:443>
ProxyPass / balancer://webcluster/
ProxyPassReverse / balancer://webcluster/
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/; secure; HttpOnly" env=BALANCER_ROUTE_CHANGED
# Non SSL
# Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/; HttpOnly" env=BALANCER_ROUTE_CHANGED
</VirtualHost>
<Proxy balancer://webcluster>
BalancerMember http://web01 route=1 retry=3 timeout=60 disablereuse=On
BalancerMember http://web02 route=2 retry=3 timeout=60 disablereuse=On
ProxySet stickysession=ROUTEID
ProxySet lbmethod=bybussyness
</Proxy>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment