A few times now I have come across the issue of nginx not starting this seems to be mainly after installing nginx on an existing system or from an upgrade of an earlier version of Plesk.

The tell tail sign of this are sites not working!!

What I was finding when manually starting it’s showing as disabled, to resolve this you need to check the status of nginx

/etc/init.d/nginx status

If you get a below result rename the pid file

nginx dead but pid file exists

then rename the pid file

mv /var/run/nginx.pid /var/run/nginx.pid.bak

After renaming the pid you can then try enabling the service, I found that an enable disable and enable tends to sort it out.

Enable the nginx service:

/usr/local/psa/admin/bin/nginxmng -e

Disable the nginx service:

/usr/local/psa/admin/bin/nginxmng -d

Enable the nginx service:

/usr/local/psa/admin/bin/nginxmng -e

Check the nginx service status:

/usr/local/psa/admin/sbin/nginxmng -s

Rebuild web configuration files:

/usr/local/psa/admin/bin/httpdmng --reconfigure-all

Once all of this has been completed you should find that nginx will start and start serving pages.

Add a comment

0.0(0 votes)

Next Post Previous Post