Hello!
I am currently using GeoServer 2.15.0 through a Tomcat running on port 8080.
To control which webapps are available on my various domains, I run a reverse proxy with Apache in front on port 80, using a normal ProxyPass & ProxyPassReverse
I also have SSL setup, so in short, my setup is like this:
https://example.com/geoserver → http://example.com:8080/geoserver (I have substituted my real domain with an example)
I want to test my newest layer, so I go into Layer Preview → OpenLayers and it opens a URL like this:
https://example.com/geoserver/dof/wms?service=WMS&version=1.1.0&request=GetMap&layers=dof%3AREGIONER&bbox=441548.9689738757%2C6049494.406376901%2C893480.0854518213%2C6402159.588024116&width=768&height=599&srs=EPSG%3A23032&format=application/openlayers
However, this returns a white map!
In the console, I see the following (I’ve translated it but hopefully it still makes sense):
Blocked mixed content “http://example.com/geoserver/openlayers3/ol.css”
Blocked mixed content “http://example.com/geoserver/openlayers3/ol.js”
Blocked mixed content “http://example.com/geoserver/openlayers3/ol.css”
Blocked mixed content “http://example.com/geoserver/openlayers3/ol.js”
Loading failed for
From what I can find in the code, org/geoserver/wms/map/AbstractOpenLayersMapOutputFormat.java:134 uses this as the baseUrl for the template:
String baseUrl =
ResponseUtils.buildURL(request.getBaseUrl(), “/”, null, URLType.RESOURCE);
The code is a bit too complex for me to create a fix, since I am not sure what ramifications my changes might have, but my guess would be that for the AbstractOpenLayersMapOutputFormat, either the base proxy url from the GeoServer settings or all X-Forwarded type of headers should be considered.
Med venlig hilsen / With regards
ANDERS OLSEN
Software Developer
BirdLife Denmark