Nginx bind() to 0.0.0.0:80 failed

If your nginx is failing to start on Ubuntu then you need to run the following commands to stop the apache which co=uld be consuming the 80 port.

sudo apachectl stop
sudo systemctl disable apache2.service

You can now start the nginx service with the help of this command:

sudo systemctl start nginx

Your nginx service will start now.