Nginx not starting on plesk

Nginx is stopped:

service nginx status
nginx is stopped

Cannot start Nginx:

/etc/init.d/nginx start
Not starting nginx as it is disabled in config

nginx service is disabled:

  • CentOS/RHEL:

cat /etc/sysconfig/nginx
NGINX_ENABLED=no

Debian/Ubuntu:

  • cat /etc/default/nginx
    NGINX_ENABLED=no

Cause nginx is disabled for starting in its configuration

Resolution

  1. Connect to the server via SSH.
  2. Enable nginx in it’s configuration file:

Set this:

  • CentOS/RHEL:

vi /etc/sysconfig/nginx
NGINX_ENABLED=yes

Debian/Ubuntu:

  • vi /etc/default/nginx
    NGINX_ENABLED=yes

Save & exit.

Reconfigure nginx and apache to listen to correct ports:

plesk sbin nginxmng -d
plesk sbin nginxmng -e

Thank you for reading this article.

Was this helpful?

1 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *