nginx startup fail on mac osx 10.9 mavericks nginx startup fail on mac osx 10.9 mavericks nginx nginx

nginx startup fail on mac osx 10.9 mavericks


Your ps ... | egrep command is finding itself, not an instance of nginx (look at the "COMMAND" column). Since port 80 is in use, it's likely some other program (maybe the Apache that comes with the OS?) is running and grabbing it. To find out, run:

sudo lsof -i:80

If it's the system Apache ("httpd") program, you can probably shut it down with:

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

If that doesn't do it, more info will be needed to figure out what's grabbing port 80 and how it's getting started.


Probably still nginx runnig and listening on port 80. try this command

sudo killall nginx


I tried the below command first to see which application is using 80 port.

sudo lsof -i -n -P | grep TCP

com.docke 1985 KOMP 25u IPv6 0x4e18b4b0735f4091 0t0 TCP *:30299 (LISTEN)com.docke 1985 KOMP 33u IPv6 0x4e18b4b0735f21f1 0t0 TCP *:80 (LISTEN)com.docke 1985 KOMP 43u IPv4 0x4e18b4b06bb5d721 0t0 TCP 127.0.0.1:6443 (LISTEN)com.docke 43889 KOMP 8u IPv4 0x4e18b4b06b933d41 0t0 TCP 127.0.0.1:63347 (LISTEN)node 85239 KOMP 29u IPv4 0x4e18b4b0954cbea1 0t0 TCP 127.0.0.1:4200 (LISTEN)

Saw the below entry on the above result. And stopped docker.

com.docke 1985 KOMP 33u IPv6 0x4e18b4b0735f21f1 0t0
TCP *:80 (LISTEN)

And tried the below two command.

sudo killall nginx

sudo nginx

My application started working and started picking 80 port from my nginx.conf file.