macOS Server and port 8080

I’m stubbornly keeping macOS Server on my Mac mini running High Sierra, as I love it’s GUI for controlling server components. I understand macOS Server wasn’t a profit leader for Apple, but it was such an elegant solution for some of us! Darn it, my mini will probably get hacked for its server components being out of date before someone pries my fingers off macOS Server.

Anyway, today I noticed I was suddenly having conflicts trying to launch Homebridge on port 8080 after installing a security patch on High Sierra. It appears the security patch messes with macOS Server’s web server settings. Fortunately, mighty Wayne Dixon encountered this issue on Mojave and published a fix. Thanks, Wayne! I changed mine from 8080 to 8081.

For now I’m back in business and reading Wayne’s solution might have tempted me to try Mojave if this mini was compatible and it won’t be unless I also try DOSDude1’s app to load Mojave… Hmmm, I’ll think about it…

Also, I briefly thought someone had hacked my server for their own use of port 8080, but this advice quickly helped me track down what it was with these commands:

sudo lsof -i :80 # checks port 8080

Then I saw something similar to:

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME acwebseca 312 root 36u IPv4 0x34ae935da20560c1 0t0 TCP> (ESTABLISHED)

Which showed a service using the PID and we probe that further:

ps -ef 312

To see:

UID PID PPID C STIME TTY TIME CMD 0 312 58 0 9:32PM ?? 0:02.70 /opt/cisco/anyconnect/bin/acwebsecagent -console

Mine showed an Apache2 folder that I led me to Wayne’s fix above.

Leave a Reply

Your email address will not be published. Required fields are marked *