Applicable to:
- Plesk for Linux
Symptoms
-
nginx fails to start:
# systemctl status nginx
* nginx.service - Startup script for nginx service
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/nginx.service.d
`-limit_nofile.conf
Active: failed (Result: exit-code) since Wed 2022-05-11 12:04:22 CEST; 4s ago
Process: 44106 ExecStartPre=/bin/sh -c [ '${NGINX_ENABLED}' = 'yes' ] || { echo Not starting nginx as it is disabled in Plesk. Run 'plesk sbin nginxmng -e' to enable nginx in Plesk.; exit 1; } (code=exited, status=1/FAILURE)
May 11 12:04:22 publicamedia.net systemd[1]: Starting Startup script for nginx service...
May 11 12:04:22 publicamedia.net sh[44106]: Not starting nginx as it is disabled in Plesk. Run 'plesk sbin nginxmng -e' to enable nginx in Plesk.
May 11 12:04:22 publicamedia.net systemd[1]: nginx.service: control process exited, code=exited status=1
May 11 12:04:22 publicamedia.net systemd[1]: Failed to start Startup script for nginx service.
May 11 12:04:22 publicamedia.net systemd[1]: Unit nginx.service entered failed state.
May 11 12:04:22 publicamedia.net systemd[1]: nginx.service failed. -
Websites show default page
Cause
With disabled nginx, the service will continue to be inactive.
Resolution
Properly restart nginx by disabling and re-enabling it:
-
Connect to the server via SSH.
-
Disable nginx:
# plesk sbin nginxmng -d
-
Enable nginx:
# plesk sbin nginxmng -e
Comments
0 comments
Please sign in to leave a comment.