Q: How to make Server 5 not listen to ports 80 and 443
I want to setup an Apache server in a Linux virtual machine (using latest VirtualBox) on my Mac running El Capitan 10.11.3.
Server 5.0.15 is already running on this Mac (and I want to keep it, except for web services). I disabled web sharing in the Server GUI but it was not enough, Apache still listened to ports 80 and 443, forbidding VirtualBox to listen to them and forward them to the Linux virtual machine.
So I commented out these lines in /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf :
#listen 80
#listen 443
#listen 8008
#listen 8800
#listen 8443
#listen 8843
After a reboot Apache seems to not listen to ports 80 and 443 anymore. However VirtualBox does not become the listener. I tried this command in the Mac terminal:
sudo lsof -i :80
and nothing was returned, suggesting that something in OS X still prevents VirtualBox to listen to ports 80 and 443. If I try to forward some random port from the Mac host to port 80 in the virtual machine, then I can access my virtualized webserver from Safari on the Mac host, through said custom port. But I'd like to use the standard port 80.
Any help truly appreciated.
Mac mini, OS X El Capitan (10.11.3), Server 5.0.15
Posted on Mar 20, 2016 8:59 AM