I have been using apache's ProxyPass
command to proxy
http://localhost:8080/geoserver/
as follows:
ProxyPass /geoserver http://localhost:8082/geoserver
ProxyPassReverse /geoserver http://localhost:8082/geoserver
This works fine until I change the source path to
ProxyPass /geoserver1 http://localhost:8082/geoserver
ProxyPassReverse /geoserver1 http://localhost:8082/geoserver
When changed to above, If I go to
http://localhost/geoserver1
in a browser, it will be redirected to
http://localhost/geoserver
automatically, without the port number. And then this gives an error of 404, address not found.
This happens if the source is anything other than /geoserver
and the destination is
http://localhost:8082/geoserver
(I suspect this has something to do with the automatic redirect from
http://localhost:8082/geoserver
to
http://localhost:8082/geoserver/web
But I am not sure whether this is the case.
How do I fix it?
This is with GeoServer 2.5 in osgeo live 8
Best Answer
The issue is to do with the Tomcat settings and not with any settings of GeoServer.
Note the Tomcat docs tell us:
So if you want to run GeoServer under a different name you might consider changing the name of the GeoServer war file deployed, or changing the name in a context file, but if you really want to use the proxy settings the following worked for me:
In httpd.conf
In server.xml