user3142695
user3142695

Reputation: 17332

Unexpected used port 80 on macOS with "It works" result

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

Answers (1)

glyvox
glyvox

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

Related Questions