Apache SSL losing session over load balancer

Posted by SaltyNuts on Server Fault See other posts from Server Fault or by SaltyNuts
Published on 2011-03-16T14:54:05Z Indexed on 2011/03/16 16:12 UTC
Read the original article Hit count: 323

Filed under:
|
|
|

I have two physical Apache servers behind a load balancer. The load balancer was supposed to be set up so that a user would always be sent to the same physical server after the first request, to preserve sessions.

This worked fine for our web apps until we added SSL to the setup. Now the user can successfully login, see the home page, but clicking on any other internal links logs the user right out. I traced the issue to the fact that while initial authentication is performed by server 1, clicking on internal links leads to having the request sent to server 2. Server 2 does not share sessions with server 1, and the user is kicked out.

How can I fix it?

Do I need to share sessions between the two servers? If so, could you point me to a good guide for doing this?

Thanks.

© Server Fault or respective owner

Related posts about apache

Related posts about ssl