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.serviceYou can now start the nginx service with the help of this command:
sudo systemctl start nginxYour nginx service will start now.