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?

  • I'm not sure whether this version is using Tomcat or Jetty as the web server, or even something bundled into the application itself? – Stephen Lead Nov 26 '17 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 – Stephen Lead Nov 30 '17 at 22:04
  • where did you install jetty? I'm not a Mac user so I can't help much more. – Ian Turton Dec 1 '17 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. – Stephen Lead Dec 1 '17 at 11:36
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, privacy policy and cookie policy

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