Nginx: Failed to start A high performance web server and a reverse proxy server

Nginx: Failed to start A high performance web server and a reverse proxy server

I wonder why nobody has not mentioned disabling apache2

sudo service apache2 stop

You already have a process bound to the HTTP port 80. (Specially after upgrading systems! it will start apache2 by default)

Run this command sudo lsof -i:80 to get a list of processes using the port and then stop or disable web server.

Try to stop the process which are using the port 80 using:
sudo fuser -k 80/tcp

In some cases it may be some issues in the configuration file. You can use nginx -t -c /etc/nginx/nginx.conf command to find any bugs in the configuration file. If you find the error, then run: sudo service nginx restart again

For me this error was caused by a default nginx site already on port 80. Removing default site worked

sudo rm /etc/nginx/sites-enabled/default
sudo service nginx restart

Nginx: Failed to start A high performance web server and a reverse proxy server

You already have a process bound to the HTTP port 80.
You can run command sudo lsof -i:80 to get a list of processes using the port and then stop/disable web server.

Leave a Reply

Your email address will not be published.