Install Config Wiki

All about installing, configuring and troubleshooting

User Tools

Site Tools


nginx_emerg_bind_80_failed_98_address_already_use

Nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)

This fixed the problem that Nginx would not start or reload

Author: rgrz

Ok, now this is weird. I am pretty sure nginx service was stopped. And I don’t have apache or anything running on the server that could use port 80… Could it have been that nginx left some resource that kept port 80 busy while certbot reconfigured/restarted the server?

I killed everything running on port 80…

$ sudo fuser -k 80/tcp
80/tcp: 3488 3489 3490 

after that nginx started normally…

The answer was provided by rgrz on February 2018 at the following source:

To Start Nginx

sudo systemctl start nginx

To Reload Nginx

sudo systemctl start nginx

To Check the Status of Nginx

sudo systemctl status nginx.service

To Check the Status of Nginx.conf after making changes to nginx webserver blocks (*.conf files) and before performing a reload of Nginx

sudo nginx -t

You should see something like this after running –

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok

nginx: configuration file /etc/nginx/nginx.conf test is successful

nginx_emerg_bind_80_failed_98_address_already_use.txt · Last modified: 2020/06/17 17:33 by wikiadmin