SOLVED- nginx: [emerg] bind() to failed (98: Address already in use)

0

After installing  nginx when you try to start it, you are likely to get the error message  [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)

root@site [~]# service nginx start
 Starting nginx daemon: nginxnginx: [emerg] bind() to 000.199.xxx.189:80 failed (98: Address already in use)
 nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
 nginx: [emerg] bind() to 000.199.xxx.189:80 failed (98: Address already in use)
 nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
 nginx: [emerg] bind() to 000.199.xxx.189:80 failed (98: Address already in use)
 nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
 nginx: [emerg] bind() to 000.199.xxx.189:80 failed (98: Address already in use)
 nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
 nginx: [emerg] bind() to 000.xxx.187.189:80 failed (98: Address already in use)
 nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
 nginx: [emerg] still could not bind()
 already running.

 Solution

Then it means nginx or some other process is already using port 80.

You can kill it using:

sudo fuser -k 80/tcp

And then try restarting nginx again:

service nginx start
Share.

About Author

Comments are closed.