Hosting on Ubuntu Linux 20.04
During my deployment and re-deployment, I faced this issue two times and would like to document it for future reference to fix it. Problem was, that my hosted web app is up and running and suddenly my website shows this default page.
sudo systemctl status apache2
It shows as Failed because TCP/80 binds twice. Bind to address [::]:80 and 0.0.0.0:80.
You can find usage of the TCP/80 by this command as well
sudo netstat -an | grep 80
One TCP/80 is used by Apache and another one is used by NGINX. Both can host applications.
systemctl status nginx
It is actively running. That means, Apache is getting down and this one Nginx is up and running.
We have to stop Nginx as we used Apache.
sudo systemctl stop nginx
It is completely inactive now.
sudo service apache2 restart
sudo systemctl status apache2
Now it is up and running
We can completely disable or uninstall Nginx to avoid such a failure in the future.
sudo systemctl disable nginx
sudo apt purge nginx