Reputation: 17332
I'm using macOS and I'm just wondering why port 80 is already used as I need to install my own nginx (as docker container) server. Going to http://localhost shows me "It works!". But I don't understand where this comes from, as I didn't installed anything by myself. I thought it could be an Apache server shipped with macOS.
So I did
$ sudo lsof -i:80
And I got this result, which I do not understand:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
httpd 9283 root 4u IPv6 0x2e000a8d22b1a699 0t0 TCP *:http (LISTEN)
httpd 9292 _www 4u IPv6 0x2e000a8d22b1a699 0t0 TCP *:http (LISTEN)
httpd 9307 _www 4u IPv6 0x2e000a8d22b1a699 0t0 TCP *:http (LISTEN)
Upvotes: 6
Views: 3130
Reputation: 58049
There is, indeed, a built-in Apache server inside macOS. To stop it, enter the following command to Terminal:
sudo apachectl stop
Upvotes: 23