httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bo Najdrovsky <>
Subject [users@httpd] https to http proxy with Apache
Date Thu, 11 May 2006 19:35:49 GMT
Hello, I have a problem I've been grappling with for the past 3 days 
without much luck so I thought I'd come to the experts.   :-)      I have 
an Apache 2.0.x server, which acts as a load balancing gateway to 
multiple Tomcat servlet containers behind it. This proxying/load 
balancing is done using the combination of mod_rewrite and mod_proxy.  
It has been working very well for traffic over normal HTTP.  I now need 
to make this work over HTTPS between the browsers and the Apache, and 
that's where I'm having the problem.   I configured the Apache server to 
listen for HTTPS requests, and they forward correctly over regular HTTP 
to the Tomcats behind it, however whenever there is an incoming POST 
from a form in the web application, the response from the Tomcat causes 
a switch to HTTP, where I need it to remain HTTPS.  Here's what the 
pertinent portion of the configuration looks like:

RewriteMap tomcats "rnd:/path/to/tomcat-workers.conf"
ProxyPreserveHost On
ProxyTimeout 8000

<Location ~ "/mywebapp">
RewriteEngine On

RewriteCond "%{HTTP_COOKIE}"      "(^};\s*)jsessionid=\w*\.(\w+)($|;)" [NC]
RewriteRule "(.*)"        "http://$(tomcats:%2)%{REQUEST_URI}" [P,L,NC]
RewriteRule "^.*;jsessionid=\w*\.(\w+)($|;)"      
"http://$(tomcats:$1)%{REQUEST_URI}" [P,L,NC]
RewriteRule "(.*)"        "http://$(tomcats:all)%{REQUEST_URI}" [P,L,NC]

ProxyPassRevese http://andy:8012/
ProxyPassRevese http://andy:8022/
ProxyPassRevese http://andy:8032/
ProxyPassRevese http://andy:8042/

I suspect that the problem lies somewhere in the ProxyPassReverse, but 
don't know what I could to remedy it. Any suggestions would be welcome.  


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