<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
span.s2
{mso-style-name:s2;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
span.n
{mso-style-name:n;}
span.o
{mso-style-name:o;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-AU" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks for the clues guys.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Francesco did you mean “python manage.py updatemaplayerip” rather than "geonode updatemaplayerip"?? The latter is not a command on geonode 2.4 afaik.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Anyway I just deleted my existing layers, and setting SITEURL to the actual server name (http://<a href="http://www.example.com">www.example.com</a>/) in local_settings.py
and restarting apache2 did indeed fix thumbnails for new layers.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<pre style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I read <a href="the%20doco">the doco</a> as saying to set SITEURL to </span><span class="s2"><span style="font-size:9.0pt;font-family:Consolas;color:#DD1144">http://localhost/ </span></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">so maybe that could be updated:<o:p></o:p></span></pre>
<pre style="background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></pre>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:18.0pt;margin-left:36.0pt;line-height:18.0pt;background:#FCFCFC">
<span style="font-family:"Arial","sans-serif";color:#404040">Change the value of the<span class="apple-converted-space"> </span></span><cite><span style="font-family:"Arial","sans-serif";color:#404040">SITEURL</span></cite><span style="font-family:"Arial","sans-serif";color:#404040">:<o:p></o:p></span></p>
<pre style="margin-left:36.0pt;background:white;box-sizing: border-box;overflow:auto"><span class="n"><span style="font-size:9.0pt;font-family:Consolas;color:#333333">SITEURL</span></span><span style="font-size:9.0pt;font-family:Consolas;color:#404040"> <span class="o"><b>=</b></span> </span><span class="s2"><span style="font-size:9.0pt;font-family:Consolas;color:#DD1144">"http://localhost/"</span></span><span style="font-size:9.0pt;font-family:Consolas;color:#404040"><o:p></o:p></span></pre>
<pre style="background:white"><span style="font-size:9.0pt;font-family:Consolas;color:#404040"><o:p> </o:p></span></pre>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Have made pull request #2714 with this small doco change.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Cheers<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Jonathan<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Francesco Bartoli [mailto:xbartolone@gmail.com]
<br>
<b>Sent:</b> Friday, 11 November 2016 7:36 PM<br>
<b>To:</b> Simone Dalmasso<br>
<b>Cc:</b> Jonathan Doig; geonode-devel@lists.osgeo.org<br>
<b>Subject:</b> Re: [GeoNode-devel] Geonode using localhost for WMS requests on Ubuntu 16.04<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">For the existing ones doing the command "geonode updatemaplayerip" should fix the rest.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Il giorno 11/nov/2016, alle ore 07:43, Simone Dalmasso <<a href="mailto:simone.dalmasso@gmail.com">simone.dalmasso@gmail.com</a>> ha scritto:<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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. <br>
<br>
Il venerd́ 11 novembre 2016, Jonathan Doig <<a href="mailto:j.doig@unsw.edu.au">j.doig@unsw.edu.au</a>> ha scritto:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi devs<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I’ve installed Geonode 2.4 on Ubuntu 16.04 following
<a href="http://docs.geonode.org/en/master/tutorials/install_and_admin/geonode_install/index.html" target="_blank">
these instructions</a> and changing where needed to make it work.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">However Geonode fails to display layers because the browser is making WMS requests to “localhost” rather than to my site URL.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I’ve fixed the maps in the individual layer pages by changing the OGC_SERVER default PUBLIC_LOCATION in local_settings.py from
<a href="http://localhost/geoserver/" target="_blank">http://localhost/geoserver/</a> to
<a href="http://%3cmy_server%3e/geoserver/">http://<my_server>/geoserver/</a><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I don’t know why that was needed though, it’s not in the installation doco.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">In any case the thumbs and legend graphics are still broken e.g.:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a href="http://localhost/uploaded/thumbs/layer-4151fb58-a7bb-11e6-994e-fa163e7da40e-thumb.png" target="_blank">http://localhost/uploaded/thumbs/layer-4151fb58-a7bb-11e6-994e-fa163e7da40e-thumb.png</a><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">My Geoserver uses the correct URL for WMS calls.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Advice please.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Jonathan Doig<o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br>
-- <br>
Simone <br>
_______________________________________________<br>
geonode-devel mailing list<br>
<a href="mailto:geonode-devel@lists.osgeo.org">geonode-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/geonode-devel">http://lists.osgeo.org/mailman/listinfo/geonode-devel</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>