3

There is a version of GeoServer available at http://docs.geoserver.org/latest/en/user/installation/osx_installer.html which is very simple to install on a Mac, only requiring the application to be dragged to the Applications folder and opened.

The only options within the GeoServer application itself are Start/Stop, and GeoServer defaults to using port 8080.

Is it possible to change the port number that is used by GeoServer in this version?

7
  • I'm not sure whether this version is using Tomcat or Jetty as the web server, or even something bundled into the application itself? Commented Nov 26, 2017 at 3:54
  • @IanTurton that answer says to look for the file $JETTY_HOME/etc/jetty.xml but $JETTY_HOME isn't set in my case so the file doesn't exist there. A system-wide search for jetty.xml doesn't show anything. Are you sure that the above answer applies for the Mac version of GeoServer? Thanks Commented Nov 30, 2017 at 22:04
  • where did you install jetty? I'm not a Mac user so I can't help much more.
    – Ian Turton
    Commented Dec 1, 2017 at 10:40
  • That's the crux of this question I guess. I didn't actually install Jetty, which doesn't seem to be a requirement for the Mac version. The Mac application may bundle its own web server (?) in which case the question is how to change its port number, or whether that's even possible. Commented Dec 1, 2017 at 11:36

1 Answer 1

0

Today I learnt that you can see the contents of an app in a Mac's Applications directory via Terminal:

$ ls /Applications/GeoServer.app

The file holding the GeoServer port number is Contents/Java/start.ini, so it's possible to edit this in admin mode using sudo vi start.ini. Search for the jetty.port section, edit the port number, save the file, and start GeoServer normally.

GeoServer is then available at the specified port number (eg http://localhost:8181/geoserver/web).

It may be a little unstable - for example I noticed that the Start/Shutdown options are both unavailable, and the status text always reads "GeoServer is starting". But this is good enough for my testing purposes.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.