kev
February 26, 2025, 7:46am
1
Hi, I am trying to setup a domainname for GeoServer.
This is the domainname: https://geoserver.domainname.nl/geoserver
In the web.xml file within \webapps\geoserver\WEB-INF i have set up the following:
<context-param>
<param-name>PROXY_BASE_URL</param-name>
<param-value>https://geoserver.domainname.nl/geoserver</param-value>
</context-param>
When i open this link i see this:
503 Service Unavailable
No server is available to handle this request.
Am i doing this correct and/or is there any other way to set this up?
Thank you.
jive
February 26, 2025, 5:25pm
2
There are several ways to set it up, are you using the binary distribution or installing a war into Tomcat?
GeoServer checks PROXY_BASE_URL value from three locations, before checking configuration.
Java System Property
-DPROXY_BASE_URL=https://geoserver.domainname.nl/geoserver
Web Application Context
Configuring your application server, for Tomcat this is done by editing conf/Catalina/localhost/geoserver.xml
:
<Context docBase="geoserver.war">
<Parameter name="PROXY_BASE_URL"
value="https://geoserver.domainname.nl/geoserver"/>
</Context>
Unzipping the geoserver.war and editing the web.xml
(not recommended as you lose your setting when updating).
<context-param>
<param-name> PROXY_BASE_URL </param-name>
<param-value>https://geoserver.domainname.nl/geoserver</param-value>
</context-param>
Environmental variable
export PROXY_BASE_URL=https://geoserver.domainname.nl/geoserver
Administration console Settings > Global (stored as part of geoserver configuration).
For more information please read Setting Application Property . It uses the example of GEOSERVER_DATA_DIR, but the same approach works for PROXY_BASE_URL.
Other tips:
kev
February 27, 2025, 6:18am
3
Thank you for the helpful insight! I was using the war file. I got it all working now so you can close the topic. Thanks for the speedy reply!