Reputation: 136
Hi all and thanks for your help. I've a webapp deployed on tomcat at localhost:8080/app and is accessible throught a www.domain.com. Hi do that with following configuration in apache
RewriteEngine on
ProxyRequests off
ProxyPreserveHost on
RewriteCond %{REQUEST_URI} !^/backoffice
RewriteRule ^/(.*)$ ajp://localhost:8009/app/$1 [P,L]
Now the authentication process not work because JSESSIONID cookie domani is "/app/" and not "/". There is a way to solve that problem. Thanks ;)
Upvotes: 0
Views: 2307
Reputation: 16615
You have two simple options and a number of complicated ones.
The simplest option is rename app.WAR to ROOT.war on Tomcat and deploy your app at as the ROOT context.
The second simple option is to use ProxyPass, ProxyPassReverse and ProxyPassReverseCookiePath to do your proxying in httpd.conf.
The complicated ones all involved using mod_headers and mod_substitute (or equivalent) to fix all the broken paths in all your HTTP headers and content.
Personally, I'd just rename the WAR. It is a lot less hassle.
Upvotes: 1
Reputation: 1631
I agree with BalusC. It seems nothing wrong with your configuration file. You should check your app and set the cookiepath to '/' . More information (for how to do that) here: Sharing session data between contexts in Tomcat
Upvotes: 0