tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Depot" <>
Subject Session cookie path with reverse proxy
Date Fri, 02 May 2003 20:24:37 GMT
We are using Apache with mod_proxy as a reverse proxy in front of our
Tomcat.  In Tomcat we have two apps, which are (locally) accessible like
this:  and

We have other stuff on our main web, and would like to keep these apps on a
virtual path on our web root, so we've configured the reverse proxy to
include the extra path info.  We've configured Apache something like this:

ProxyPass  /foo/bar/app1/
ProxyPass  /foo/bar/app2/
ProxyPassReverse  /foo/bar/app1/
ProxyPassReverse  /foo/bar/app2/

The proxy mechanism itself seems to work fine, but the problem is how do we
deal with the path in the session cookies that Tomcat generates?  Tomcat is
creating session cookies that contain a path for the app, like  /app1  or
/app2.  But because of the reverse proxy, what the browser actually sees as
a url is  /foo/bar/app1 or  /foo/bar/app2, and so would not send the cookie
back when it should.

What is the proper way to handle generation of session cookies when you are
using a reverse proxy which changes the url that the browser sees?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message