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)
There is, indeed, a built-in Apache server inside macOS. To stop it, enter the following command to Terminal:
sudo apachectl stop
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.