I have been working on it quite some time. I want to set the IP address of Geoserver to what is of Geonode so that both connect properly to upload layers and create map. Geonode comes builtin with Geoserver. Just that we have to run commands like:
paver setup_geoserver
paver start_geoserver
and it starts Geoserver but on localhost.
i have tried to go to this file ./geoserver/geoserver/WEB-INF/web.xml
and change the IP address and port in it.
<context-param>
<param-name>PROXY_BASE_URL</param-name>
<param-value>http://1.2.3.4:8080/geoserver</param-value>
</context-param>
i have also changed the .env file located in venv/lib/python3.8/site-packages/geonode/.env
SITEURL="http://1.2.3.4:8000"
GEOSERVER_WEB_UI_LOCATION="http://1.2.3.4:8080/geoserver/"
GEOSERVER_PUBLIC_LOCATION="http://1.2.3.4.180:8080/geoserver/"
GEOSERVER_LOCATION="http://1.2.3.4:8080/geoserver/"
SITE_HOST_NAME="1.2.3.4"
i also changed the Proxy Base URL present in global settings on Geoserver website. but still two problems persist.
- when i go from Geonode to Geoserver via a link present on Geonode website, it goes to localhost:8080/geoserver.
- uploading layers is working fine but when i go on create map to fetch layers to show on map then it gives error: “the layer has not been loaded correctly or not available”.
Note: i am using Nginx and Gunicorn for Geonode
Any help would be appreciated. thanks.