Apache and ngnix conflicts

I have been working on this for a while, different ports but for some reasons it conflicts, when i stop Apache, ngnix work, when i stop ngnix apache works. I need help please.

The first thing you should do is check the logs, or at least the status of the services.

Also, did you modify any of the nginx or apache configurations? Was there any recent update that might have overwritten the nginx and/or apache2 configuration?

systemctl restart nginx
systemctl status nginx --no-pager -l
systemctl restart apache2
systemctl status apache2 --no-pager -l

Ok, what did you change?

Show the output of the commands I shared in the other post.

Again, what did you change in nginx? Also, apache has been modified too, it shouldn’t try to start on port 80, only 8080 and 8443.

Show the output of these commands:

tail /etc/nginx/nginx.conf
grep -R :80 /etc/apache2
ls -l /etc/apache2/conf.d/
grep IncludeOptional /etc/apache2/apache2.conf

If those sites are loaded is because something changed the apache2 conf provided by Hestia.

mv /etc/apache2/apache2.conf /etc/apache2/apache2.conf.bad
cp -f /usr/local/hestia/install/deb/apache2/apache2.conf /etc/apache2/

Restart apache2:

systemctl restart apache2
systemctl status apache2 --no-pager -l

Just for the record.

User also had this conf:

root@serv:/etc/apache2# cat ports.conf 
# Powered by hestia
Listen 80

Once the Listen directive has been removed, Apache started again.

4 Likes