[GeoNode-devel] Geonode using localhost for WMS requests on Ubuntu 16.04

Jonathan Doig j.doig at unsw.edu.au
Sun Nov 13 23:10:24 PST 2016


Thanks for the clues guys.

Francesco did you mean "python manage.py updatemaplayerip" rather than "geonode updatemaplayerip"?? The latter is not a command on geonode 2.4 afaik.

Anyway I just deleted my existing layers, and setting SITEURL to the actual server name (http://www.example.com<http://www.example.com>/) in local_settings.py and restarting apache2 did indeed fix thumbnails for new layers.


I read the doco<the%20doco> as saying to set SITEURL to http://localhost/ so maybe that could be updated:



Change the value of the SITEURL:

SITEURL = "http://localhost/"


Have made pull request #2714 with this small doco change.

Cheers
Jonathan

From: Francesco Bartoli [mailto:xbartolone at gmail.com]
Sent: Friday, 11 November 2016 7:36 PM
To: Simone Dalmasso
Cc: Jonathan Doig; geonode-devel at lists.osgeo.org
Subject: Re: [GeoNode-devel] Geonode using localhost for WMS requests on Ubuntu 16.04

Hi,

For the existing ones doing the command "geonode updatemaplayerip" should fix the rest.

Il giorno 11/nov/2016, alle ore 07:43, Simone Dalmasso <simone.dalmasso at gmail.com<mailto:simone.dalmasso at gmail.com>> ha scritto:


Hi,

Fixing the settings is correct and will fix layers and new maps. However for existing maps you have either to adjust the URL in admin maplayers or recreate the map. Thumbnails can be generated too via edit layer/map page.

Il venerdì 11 novembre 2016, Jonathan Doig <j.doig at unsw.edu.au<mailto:j.doig at unsw.edu.au>> ha scritto:
Hi devs

I've installed Geonode 2.4 on Ubuntu 16.04 following these instructions<http://docs.geonode.org/en/master/tutorials/install_and_admin/geonode_install/index.html> and changing where needed to make it work.

However Geonode fails to display layers because the browser is making WMS requests to "localhost" rather than to my site URL.

I've fixed the maps in the individual layer pages by changing the OGC_SERVER default PUBLIC_LOCATION in local_settings.py from http://localhost/geoserver/ to http://<my_server>/geoserver/<http://%3cmy_server%3e/geoserver/>

I don't know why that was needed though, it's not in the installation doco.

In any case the thumbs and legend graphics are still broken e.g.:
http://localhost/uploaded/thumbs/layer-4151fb58-a7bb-11e6-994e-fa163e7da40e-thumb.png

My Geoserver uses the correct URL for WMS calls.

Advice please.

Thanks
Jonathan Doig


--
Simone
_______________________________________________
geonode-devel mailing list
geonode-devel at lists.osgeo.org<mailto:geonode-devel at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/geonode-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-devel/attachments/20161114/78edf500/attachment.html>


More information about the geonode-devel mailing list