httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Timby <>
Subject Re: [users@httpd] Sharing mod_proxy_balancer session data with multiple virtual hosts
Date Fri, 29 Jul 2011 01:36:08 GMT
On Thu, Jul 28, 2011 at 10:10 AM, Jonathan Knight
<> 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.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message