Hello,
I am trying to make two web applications (geoserver), running on servers 
10.0.0.101:8080 and 10.0.0.102:8080 in a private subnet, accessible through 
www.publicdomain.com/geoserver1 and  www.publicdomain.com/geoserver2.
The problem is that the login to the web application uses cookies, and I 
can't figure out how to make the login to _both_ geoservers succeed 
using the proxy_http module.

Is such a setup possible in principle, and can I use several 
"ProxyPassReverseCookiePath"s in the same apache configuration file, if 
they point to the same local path (/geoserver) on the proxied servers?

I tried the following configuration (added towards the end of 
/etc/apache2/sites-enabled/000-default in an ubuntu 12.04 server).
Only the login to http://www.publicdomain.com/geoserver2 does _not_ work - I am 
redirected to the login page as if the cookie is silently lost.
Everything else is fine: I can access http://www.publicdomain.com/geoserver2 
(without login), and I can access and login to 
http://www.publicdomain.com/geoserver1.

(If I change the order of geoserver1 and geoserver2 in the configuration, I can 
login to geoserver2 instead of geoserver1. Login to the first of 
the two geoservers is even possible without any 
ProxyPassReverseCookieDomain directive in the configuration.)

What do I have to change?

Here comes the proxy configuration part:

...

ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /geoserver1 http://10.0.0.101:8080/geoserver
ProxyPassReverse /geoserver1
 http://10.0.0.101:8080/geoserver

ProxyPassReverseCookiePath /geoserver /geoserver1
ProxyPassReverseCookieDomain 10.0.0.101:8080 www.publicdomain.com

ProxyPass /geoserver2 http://10.0.0.102:8080/geoserver
ProxyPassReverse /geoserver2 http://10.0.0.102:8080/geoserver

ProxyPassReverseCookiePath /geoserver /geoserver2
ProxyPassReverseCookieDomain 10.0.0.102:8080 www.publicdomain.com

</VirtualHost>

Thank you very much
Alan

Reply via email to