Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are using Apache to load balance our backend (IIS) web servers. Our configuration follows an example from Apache doc. We try to achieve sticky routing (i.e. subsequent requests from the same client will be routed to the same upstream server) with a cookie set by Apache.

Our configuration looks like:

ProxyRequests off
ProxyPreserveHost On

<Proxy balancer://oursitename>
allow from all
BalancerMember route=1
# Further servers will be added here
ProxySet stickysession=ROUTEID

# This line should set the correct cookie..

ProxyPass /balancer-manager !
ProxyPass / balancer://oursitename/ nofailover=Off
ProxyPassReverse /

<Location /balancer-manager>
SetHandler balancer-manager
Order Deny,Allow
Allow from all

Now Apache seems not to include the actual route, but the cookie does only contain the dot ".". I checked with Firebug and Wireshark. So in every HTTP response header appears (i.e. for each image/css/js):

Set-Cookie: ROUTEID=.; path=/

Surprisingly, when reloading the page about twice, suddenly there appears a Set-Cookie: ROUTEID=.2 in one of about ten responses. The browser uses this value in subsequent requests, which are then NOT acked by further Set-Cookie entries. So it seems like Apache accepts the route .2 as valid. I don't understand why it is always the .2, this number appears even if I remove the second server from the balancer!

Can anyone explain me what happens here and how I can fix it?

share|improve this question

I am not sure why it stays with 2. However part of your config is



will be 1 if the router has changed 0 otherwise, so if the route has not changed, then the cookie will not be set unless it needs to change to a new value.

share|improve this answer

It stays with 2 because you have set the stickysession that makes it stick to the current member server. Clear cache and refresh it should change (try this few times), and then stick to the new value until you delete cookies. To get better idea see


share|improve this answer
Hi, I am not sure if your answer fits to my question. You (and the link neither) do not explain e.g. how it is possible that the following string is received by the clients: Set-Cookie: ROUTEID=.; path=/ – Tarnschaf Apr 24 '15 at 7:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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