3
I have apache2 installed on Mac OS X 10.7.4 via macports
Recently I have not been able to access my localhost directory I get a 404, but I can access 127.0.0.1
I've tried restarting apache:
sudo /opt/local/apache2/bin/apachectl stop
sudo /opt/local/apache2/bin/apachectl start
and I get the following errors:
(48)Address already in use: make_sock: could not bind to address [::]:80
(48)Address already in use: make_sock: could not bind to address [::]:443
I've checked that web sharing is off. It seems like apache is already using these points or the service is not stopping correctly.
How can I find out what is using the ports?
Thanks
lsof -i :80
shows processes using that port. Any idea how to fix the Apache errors? – benedict_w – 2012-09-24T09:23:30.187Well, the only way to let Apache bind to those ports is by getting rid of the processes that are using them, try the 'kill' shell command... – None – 2012-09-24T09:26:17.747
It seems that the mac version of apache has started
/usr/sbin/httpd
even though I have "web sharing" turned off. If I kill this process it restarts, even though it's disabled in the launch daemons. This seems to be what is stopping the macports apache running. – benedict_w – 2012-09-24T09:47:15.843