<div dir="ltr">Hi Teresa,<div><br></div><div>I was able to do this with nginx configuration. I am running on docker so I had to create a slightly customised nginx docker container.</div><div>The nginx.conf needs to have a geonode entry something like this - it's not perfect but it works for my purpose;</div><div><br></div><div><pre class="gmail-code gmail-highlight" lang="nginx"><span id="gmail-LC192" class="gmail-line" lang="nginx"> <span class="gmail-kn">location</span> <span class="gmail-n">/geonode</span> <span class="gmail-p">{</span></span>
<span id="gmail-LC193" class="gmail-line" lang="nginx"> <span class="gmail-kn">etag</span> <span class="gmail-no">off</span><span class="gmail-p">;</span></span>
<span id="gmail-LC194" class="gmail-line" lang="nginx"> <span class="gmail-kn">expires</span> <span class="gmail-mi">0</span><span class="gmail-p">;</span></span>
<span id="gmail-LC195" class="gmail-line" lang="nginx"> <span class="gmail-kn">rewrite</span> <span class="gmail-n">/geonode</span><span class="gmail-s">(.+)</span> <span class="gmail-nv">$1</span> <span class="gmail-s">break</span><span class="gmail-p">;</span></span>
<span id="gmail-LC196" class="gmail-line" lang="nginx"> <span class="gmail-kn">include</span> <span class="gmail-s">uwsgi_params</span><span class="gmail-p">;</span></span>
<span id="gmail-LC197" class="gmail-line" lang="nginx"> <span class="gmail-kn">uwsgi_pass</span> <span class="gmail-s">uwsgi://django:8000</span><span class="gmail-p">;</span></span>
<span id="gmail-LC198" class="gmail-line" lang="nginx"></span>
<span id="gmail-LC199" class="gmail-line" lang="nginx"> <span class="gmail-kn">add_header</span> <span class="gmail-s">Access-Control-Allow-Credentials</span> <span class="gmail-s">false</span><span class="gmail-p">;</span></span>
<span id="gmail-LC200" class="gmail-line" lang="nginx"> <span class="gmail-kn">add_header</span> <span class="gmail-s">Access-Control-Allow-Headers</span> <span class="gmail-s">"Content-Type,</span> <span class="gmail-s">Accept,</span> <span class="gmail-s">Authorization,</span> <span class="gmail-s">Origin,</span> <span class="gmail-s">User-Agent"</span><span class="gmail-p">;</span></span>
<span id="gmail-LC201" class="gmail-line" lang="nginx"> <span class="gmail-kn">add_header</span> <span class="gmail-s">Access-Control-Allow-Methods</span> <span class="gmail-s">"GET,</span> <span class="gmail-s">POST,</span> <span class="gmail-s">PUT,</span> <span class="gmail-s">PATCH,</span> <span class="gmail-s">OPTIONS"</span><span class="gmail-p">;</span></span>
<span id="gmail-LC202" class="gmail-line" lang="nginx"> <span class="gmail-kn">if</span> <span class="gmail-s">(</span><span class="gmail-nv">$request_method</span> <span class="gmail-p">=</span> <span class="gmail-s">OPTIONS)</span> <span class="gmail-p">{</span></span>
<span id="gmail-LC203" class="gmail-line" lang="nginx"> <span class="gmail-kn">add_header</span> <span class="gmail-s">Access-Control-Allow-Methods</span> <span class="gmail-s">"GET,</span> <span class="gmail-s">POST,</span> <span class="gmail-s">PUT,</span> <span class="gmail-s">PATCH,</span> <span class="gmail-s">OPTIONS"</span><span class="gmail-p">;</span></span>
<span id="gmail-LC204" class="gmail-line" lang="nginx"> <span class="gmail-kn">add_header</span> <span class="gmail-s">Access-Control-Allow-Headers</span> <span class="gmail-s">"Authorization,</span> <span class="gmail-s">Content-Type,</span> <span class="gmail-s">Accept"</span><span class="gmail-p">;</span></span>
<span id="gmail-LC205" class="gmail-line" lang="nginx"> <span class="gmail-kn">add_header</span> <span class="gmail-s">Access-Control-Allow-Credentials</span> <span class="gmail-s">true</span><span class="gmail-p">;</span></span>
<span id="gmail-LC206" class="gmail-line" lang="nginx"> <span class="gmail-kn">add_header</span> <span class="gmail-s">Content-Length</span> <span class="gmail-mi">0</span><span class="gmail-p">;</span></span>
<span id="gmail-LC207" class="gmail-line" lang="nginx"> <span class="gmail-kn">add_header</span> <span class="gmail-s">Content-Type</span> <span class="gmail-nc">text/plain</span><span class="gmail-p">;</span></span>
<span id="gmail-LC208" class="gmail-line" lang="nginx"> <span class="gmail-kn">add_header</span> <span class="gmail-s">Access-Control-Max-Age</span> <span class="gmail-mi">1728000</span><span class="gmail-p">;</span></span>
<span id="gmail-LC209" class="gmail-line" lang="nginx"> <span class="gmail-kn">return</span> <span class="gmail-mi">200</span><span class="gmail-p">;</span></span>
<span id="gmail-LC210" class="gmail-line" lang="nginx"> <span class="gmail-p">}</span></span>
<span id="gmail-LC211" class="gmail-line" lang="nginx"></span>
<span id="gmail-LC212" class="gmail-line" lang="nginx"> <span class="gmail-kn">client_max_body_size</span> <span class="gmail-mi">1500M</span><span class="gmail-p">;</span></span>
<span id="gmail-LC213" class="gmail-line" lang="nginx"> <span class="gmail-kn">client_body_buffer_size</span> <span class="gmail-mi">2M</span><span class="gmail-p">;</span></span>
<span id="gmail-LC219" class="gmail-line" lang="nginx"> <span class="gmail-kn">proxy_redirect</span> <span class="gmail-s"><a href="http://django:8000">http://django:8000</a></span> <span class="gmail-n">/geonode</span><span class="gmail-p">;</span></span>
<span id="gmail-LC223" class="gmail-line" lang="nginx"> <span class="gmail-p">}</span></span>
</pre></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 25 Mar 2020 at 22:15, Francesco Bartoli <<a href="mailto:xbartolone@gmail.com">xbartolone@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div name="messageBodySection">
<div dir="auto">Hi Teresa,
<div dir="auto"><br></div>
<div dir="auto">this would heavily affect the routing of the django application and its configuration. You can try to adapt it within a geonode-project but I can’t recommend.</div>
<div dir="auto">I don’t know if others have some different experiences.</div>
</div>
</div>
<div name="messageSignatureSection"><br>
<div dir="auto">Hope this helps
<div dir="auto">Francesco</div>
</div>
</div>
<div name="messageReplySection">Il 25 mar 2020, 10:12 +0100, Teresa Fazio <<a href="mailto:fazio@planetek.it" target="_blank">fazio@planetek.it</a>>, ha scritto:<br>
<blockquote type="cite" style="margin:5px;padding-left:10px;border-left:thin solid rgb(26,188,156)">
<div>
<p class="MsoNormal">Hi all,</p>
<p class="MsoNormal">How can I publish my geonode app under url like</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><a href="https://mydomain.it/geonode" target="_blank">https://mydomain.it/geonode</a></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Thanks in advance</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span style="color:rgb(31,73,125)">Teresa Fazio</span></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125)">Technical Specialist</span></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125)">Government & Security SBU</span></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125)"> </span></p>
<p class="MsoNormal"><span lang="IT" style="color:rgb(31,73,125)">Planetek Italia S.r.l.</span></p>
<p class="MsoNormal"><span lang="IT" style="color:rgb(31,73,125)">Via Massaua, 12</span></p>
<p class="MsoNormal"><span lang="IT" style="color:rgb(31,73,125)">I-70132 Bari BA - Italy</span></p>
<p class="MsoNormal"><span lang="IT" style="color:rgb(31,73,125)">Tel. +39 080 9644200</span></p>
<p class="MsoNormal"><span lang="IT"><a href="mailto:fazio@planetek.it" target="_blank"><span style="color:blue">fazio@planetek.it</span></a><span style="color:rgb(31,73,125)"></span></span></p>
<p class="MsoNormal"><span lang="IT"><a href="http://www.planetek.it/" target="_blank"><span style="color:blue">http://www.planetek.it</span></a><span style="color:rgb(31,73,125)"></span></span></p>
<p class="MsoNormal"><span lang="IT"> </span></p>
</div>
_______________________________________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geonode-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/geonode-users</a><br></blockquote>
</div>
</div>
_______________________________________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geonode-users</a><br>
</blockquote></div>