Hi all,
I have switched from 1.6.2 to 1.7.2. My geoserver is running behind a proxy, result is that the openlayers demo's are no longer working when you access them from outside ( www ) ...
Here's what I did:
1 ) Adjust jetty ( to have the correct context path )
in "/geoserver-1.7.2/webapps/geoserver/WEB-INF/jetty-web.xml" I added the following line:
...
<Set name="contextPath">/myproject/geoserver</Set>
...
This makes jetty listen to http://192.168.2.37:8080/myproject/geoserver
2) Adjust geoserver configuration ( to have the correct base url in the code that is send back to the browser )
/geoserver-1.7.2/data_dir/services.xml: <ProxyBaseUrl>http://myserver.mycompany.be/dmt/geoserver/</ProxyBaseUrl>
So my external address is at "myserver.mycompany.be"
3) go to "http://myserver.mycompany.be/myproject/geoserver/mapPreview.do"
There choose a Openlayers example, the result is html code that has WMS declarations like this
............
// setup tiled layer
tiled = new OpenLayers.Layer.WMS(
"DMT:dmt_whole - Tiled", "http://192.168.2.37:8080/myproject/geoserver/wms",
{
height: '379',
width: '800',
layers: 'DMT:dmt_whole',
styles: '',
srs: 'EPSG:32631',
format: format,
tiled: 'true',
tilesOrigin : "436000,5648999"
},
{buffer: 0}
);
.................
So this does not work from outside the firewall .... the browser is trying to connect to the internal address http://192.168.2.37:8080, so the examples are no longer working in 1.7.2, but it used to be in 1.6.2
Regards,
Stephen
---
This e-mail, any attachments and the information it contains are confidential and meant only for the use of the addressee(s) only. Access to this e-mail by anyone other than the addressee(s) is unauthorized. If you are not the intended addressee (or responsible for delivery of the message to such person), you may not use, copy, distribute or deliver to anyone this message (or any part of its contents) or take any action in reliance on it. In such case, you should destroy this message and notify the sender immediately. If you have received this e-mail in error, please notify us immediately by e-mail or telephone and delete the e-mail from any computer.
All reasonable precautions have been taken to ensure no viruses are present in this e-mail and its attachments. As our company cannot accept responsibility for any loss or damage arising from the use of this e-mail or attachments we recommend that you subject these to your virus checking procedures prior to use.