Symptoms
-
Plesk websites are not accessible.
-
The following error can be found in the nginx error log file
/var/log/nginx/error.log
or on the Home page in Plesk:[emerg] 2060#0: duplicate listen options for [203.0.113.2]:80 in /etc/nginx/plesk.conf.d/server.conf:29
-
It is not possible to start the Nginx webserver:
# systemctl status nginx
...
Process: 21034 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)
Cause
Nginx is disabled for starting in its own configuration.
In the corresponding configuration file, the NGINX_ENABLED
line without any value is present:
- For RHEL-based operating systems:
/etc/sysconfig/nginx
. - For Debian-like operating systems:
/etc/default/nginx
.
Resolution
-
Connect to the server via SSH.
-
Reconfigure nginx and Apache to listen on the correct ports by executing the two commands below:
# plesk sbin nginxmng -d
# plesk sbin nginxmng -e
In case LiteSpeed Web Server is used
Warning: LiteSpeed requires nginx to be disabled, as it cannot work with it.
-
Connect to the server via SSH.
-
Disable nginx in Plesk:
# plesk sbin nginxmng -d
Additional information
Nginx service enabled in Plesk is unable to start: Not starting nginx as it is disabled in Plesk.
Cannot start nginx service on Plesk server: Failed to start Startup script for nginx service
Apache with nginx | How Plesk with nginx Processes HTTP Requests | Plesk Obsidian documentation