On Thu, Jul 28, 2011 at 10:10 AM, Jonathan Knight <j.knight@xxxxxxxxxxxxxxx> wrote: > I'm building a load balancer using apache. We have to support both SSl and > non-SSL sessions and the problem I'm trying to solve is how to get both > virtual hosts to share session data so that a when a connection is sent to > the non-SSL port, it is proxied to the same server as the SSL session. > > Here's a bit of httpd.conf. This one will correctly proxy SSL and non-SSL > sessions but won't necessarily use the same server from the same client. > > My fallback plan is to force SSL for everything which will overcome the > difficulty, but I am interested in knowing if there is a way of sharing > session data between virtual hosts. Don't bother sharing session data, just do stickiness using a dedicated cookie (other than the session cookie). This cookie will be set by one apache instance and recognized by both. As long as the cookie is not SSL only, it will direct both SSL and plaintext traffic to the same backend. There are plenty of examples below. http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx