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.
Listen 160.5.xx.yy:80
Listen 160.5.xx.yy:443
<VirtualHost 160.5.xx.yy:80>
ServerName zzzz.keele.ac.uk
ServerAdmin j.kni...@isc.keele.ac.uk
CustomLog /var/log/httpd/logs/staff/access_log common
ErrorLog /var/log/httpd/logs/staff/error_log
LogLevel debug
<Proxy balancer://staffcluster/>
BalancerMember http://server1.keele.ac.uk
BalancerMember http://server2.keele.ac.uk
</Proxy>
ProxyRequests off
ProxyPreserveHost on
ProxyPass /balancer-manager !
ProxyPass / balancer://staffcluster/ stickysession=JSESSIONID
lbmethod=bybusyness
ProxyPassReverse / balancer://staffcluster/
</VirtualHost>
<VirtualHost 160.5.xx.yy:443>
ServerName zzzz.keele.ac.uk
ServerAdmin j.kni...@kis.keele.ac.uk
CustomLog /var/log/httpd/logs/staff/access_log common
ErrorLog /var/log/httpd/logs/staff/error_log
LogLevel debug
<Location /balancer-manager>
SetHandler balancer-manager
Order deny,allow
Deny from all
Allow from 160.5.zz
</Location>
<Proxy balancer://staffcluster/>
BalancerMember https://server1.keele.ac.uk
BalancerMember https://server2.keele.ac.uk
</Proxy>
ProxyRequests off
ProxyPreserveHost on
ProxyPass /balancer-manager !
ProxyPass / balancer://staffcluster/ stickysession=JSESSIONID
lbmethod=bybusyness
ProxyPassReverse / balancer://staffcluster/
SSLEngine on
SSLProxyEngine on
# SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /usr/local/apache2/conf/cert.crt
SSLCertificateKeyFile /usr/local/apache2/conf/key.crt
SSLCACertificateFile /usr/local/apache2/conf/cacert.crt
</VirtualHost>
---------------------------------------------------------------------
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-unsubscr...@httpd.apache.org
" from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org