Applicable to:
- Plesk for Linux
Symptoms
-
Domains are not available with:
CONFIG_TEXT: 500 internal server error
-
Default Plesk page is shown instead of the domain's content
-
The following error is shown in Plesk:
PLESK_ERROR: New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] bind() to 203.0.113.2:80 failed (99: Cannot assign requested address) nginx: configuration file /etc/nginx/nginx.conf test failed . Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files. See the details in Configuration Troubleshooter
-
A similar error can be seen when starting Nginx via SSH:
# service nginx start
nginx: [emerg] bind() to 203.0.113.2:80 failed (99: Cannot assign requested address)
-
Apache is listening on 80 (443) port:
# netstat -tlpn | grep :80
tcp6 0 0 :::80 :::* LISTEN 15726/httpd -
Nginx is enabled:
# plesk sbin nginxmng -s
Enabled
Cause
Web server misconfiguration: nginx is enabled, but it does not listen to 80/443 ports for http/https connections.
Resolution
-
Connect to the server using SSH.
-
Re-enable nginx so that nginx and apache are re-configured on correct ports:
# plesk sbin nginxmng -d
# plesk sbin nginxmng -e
Comments
1 comment
The first command runs OK but second command gives me an error as per below.
[2023-08-23 00:51:49.506] 45415:64e55820d2202 ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/nginx-config' '-t'] with exit code [1]
[2023-08-23 00:51:50.286] 45415:64e55820d2202 ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/nginx-config' '-t'] with exit code [1]
[2023-08-23 00:51:50.837] 45415:64e55820d2202 ERR [panel] Apache config (16927519080.19291200) generation failed: Template_Exception: nginx: [emerg] bind() to [2600:1f14:fc4:1600:902f:17e8:5e98:3a8e]:443 failed (99: Cannot assign requested address)
nginx: configuration file /etc/nginx/nginx.conf test failed
file: /opt/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
nginx: [emerg] bind() to [2600:1f14:fc4:1600:902f:17e8:5e98:3a8e]:443 failed (99: Cannot assign requested address)
nginx: configuration file /etc/nginx/nginx.conf test failed
What can be causing this?
Please sign in to leave a comment.