Few days ago I had to deal with this error when I wanted to restart my Nginx Web Server:

/etc/init.d/nginx restart
Stopping nginx:                                            [FAILED]
Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
[FAILED]

After some internet searches, I’ve found the fix:

fuser -  Is displaying the PIDs of processes that are using the specified files or file systems.

Then you need to search what PID (process ID) is using the 80 port by typing the following command:

fuser -n tcp 80
80/tcp:                459   465   477

Now just kill those processes: Continue Reading…

Page 1 of 11