Applicable to:
- Plesk for Linux
Symptoms
-
Websites hosted in Plesk are not accessible
-
It is not possible to start Nginx webserver:
# /etc/init.d/nginx start
Not starting nginx as it is disabled in config -
Nginx error log file at
/var/log/nginx/error.log
contains the following line:[emerg] 2060#0: duplicate listen options for [2001:db8:f61:a1ff:0:0:0:80]:80 in /etc/nginx/plesk.conf.d/server.conf:29
Cause
Nginx is disabled for starting in its configuration.
Resolution
-
Connect to the server via SSH
-
Edit the nginx configuration files to enable the service. Change line with
NGINX_ENABLED
toNGINX_ENABLED=yes
:-
Configuration file location in CentOS/RHEL based operating systems:
/etc/sysconfig/nginx
-
Configuration file location in Debian/Ubuntu based operating systems:
/etc/default/nginx
-
-
Reconfigure nginx and apache to listen to correct ports:
# plesk sbin nginxmng -d
# plesk sbin nginxmng -e
Note: LiteSpeed requires nginx to be disabled, as it cannot work with it.
-
Connect to the server via SSH.
-
Disable nginx in Plesk to create correct configuration:
# plesk sbin nginxmng -d
Comments
2 comments
I followed everything and it still refuses to start up on my rocky linux vm server, no matter what solution I try, it's the same "nginx has exited with error code" each and every time, what am i doing wrong?
It helps.
Thank you.
Please sign in to leave a comment.