skip to Main Content

I’ve configured a GeoServer for testing (2.19.2) on Ubuntu 20.04. It’s available on SSL via an Nginx reverse proxy and I can access the web interface at the expected address https://<www.expectedaddress.com>. The Proxy Base URL is set to that same address in the GeoServer web interface settings. It’s my understanding that this is what needs to be configured so that all of the web interface functionality works properly. However, it seems that the Layer Previews still point to 127.0.0.1:8080.
There may be other functionality that isn’t working, but I’ve not discovered it yet.

What other configuration needs to be done in order make sure that https://<www.expectedaddress.com> is the Base Url applied?

Interestingly, the integrated GeoWeb Cache "Demo" page properly launches the OpenLayers previews, however.

2

Answers


  1. Chosen as BEST ANSWER

    OK, so doing something that seems to go against all the other solutions I have seen fixed it for me. Simply removing the Proxy Base Url in the Geoserver global settings somehow worked. Everything I've tested seems to now be functional. Can't say that I understand why, but at this point, I'll take it.


  2. I had the same problem and was able to solve it by

    • enabling Use headers for Proxy URL in the Global Settings,
    • setting ${X-Forwarded-Proto}://${X-Forwarded-Host}${X-Forwarded-Path} for the Proxy Base URL and
    • setting the PROXY_BASE_URL environment variable, f.e. by adding it to the Java startup parameters: -DPROXY_BASE_URL=https://<www.expectedaddress.com>/geoserver or by setting it as context parameter in GeoServer’s web.xml file.

    I imagine that it should also be possible to use the fixed URL https://<www.expectedaddress.com>/geoserver instead of the header placeholders in the global settings, but I didn’t test that.

    The only drawback here is that the layer preview now seems to be tied to <www.expectedaddress.com> and doesn’t work properly when being accessed over http://localhost:8080 for example.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search