This is the error message I get when I try to run nginx:
nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
nginx: [emerg] still could not bind()
I have disabled apache, so it’s not that. Previous to this, I
uninstalled nginx (using mac osx snow leopard), but 0.0.0.0 and
127.0.0.1 were still displaying “Welcome to nginx”. I then re-installed
nginx and I have been trying to run it, but I am getting these errors.
I’ve tried checking what is on port 80 with this:
$ sudo lsof -i:80
but nothing is returned.
0.0.0.0:80 displays: “404 Not Found nginx/1.0.6”
Output of “ps ax -o pid,ppid,%cpu,vsz,wchan,command|egrep
‘(nginx|PID)’”
you probably still have an nginx running and listening on localhost
port 80. what do you mean with install/uninstall, how did you do that?
after uninstalling did you make sure the running process is also dead?
try to “sudo killall nginx” and then try to run it again.
$ sudo killall nginx
Password:
No matching processes were found
When I try to run it, the same error occurs.
To uninstall it, since there was no “easy” way to remove it, I just
removed every file or folder which contained any nginx in its title or
anywhere in the contents. There didn’t seem to be any other way to
remove it.
The first time I installed it, I did a manual install. The second time I
used: “sudo port install nginx”.
Did you check your process using ps -ef | grep nginx
Does it list any of the nginx process running? If yes then kill each one
of those and re-check it using above command.
ynasser wrote in post #1020988:
$ sudo killall nginx
Password:
No matching processes were found
When I try to run it, the same error occurs.
To uninstall it, since there was no “easy” way to remove it, I just
removed every file or folder which contained any nginx in its title or
anywhere in the contents. There didn’t seem to be any other way to
remove it.
The first time I installed it, I did a manual install. The second time I
used: “sudo port install nginx”.