Hello,

I can not access to GeoServer inside a virtual machine using a proxy.

I have a Vagrant virtual machine. GeoServer is running inside the VM and it is accessible from the host through the port 8085, so http://localhost:8085/geoserver works perfect.

In the Vagrantfile I have this line to set the forwarded port

    config.vm.network "forwarded_port", guest: 8080, host: 8085

In the host I have also Apache2 installed, and I have a proxy configuration to access to the GeoServer inside the VM. The configuration is the following:

    <Proxy *>
      Order allow,deny
      Allow from all
    </Proxy>

    ProxyPreserveHost On

    ProxyPass /geonodegs http://localhost:8085
    ProxyPassReverse /geonodegs http://localhost:8085

I know the proxy is working because typing http://localhost/geonodegs shows the Tomcat it works page.

The problem is when I try to access to GeoServer using the proxy http://localhost/geonodegs/geoserver does not work. Geoserver redirects the request to http://localhost/geoserver/index.html, which do not exists. The proper url is http://localhost/geonodegs/geoserver/index.

I have already set the setting 'settings/global/url base proxy' to http://localhost/geonodegs/geoserver, even I have edited the file /var/lib/tomcat8/webapps/geoserver/WEB-INF/web.xml and set the following.

    <context-param>
      <param-name>PROXY_BASE_URL</param-name>
<param-value>http://localhost/geonodegs/geoserver</param-value>
    </context-param>

I also restarted the tomcat service in the VM, but It does not wok.

I need to use the Apache proxy because I must not open to internet the port 8085 in the real server.

Thank you very much for your time.

---

Software details:

    - Vagrant VM: Uuntu Server 18.04

    - Host: Ubuntu Desktop 16.04

    - Tomcat 8

    - Geoserver 2.14-snapshot

    - Vagrant 2.2.4

    - VirtualBox 5.1.38


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to