- Plesk Onyx for Linux
The error below is displayed on Plesk home page or sent by email to administrators after adding a new IPv6 address via Plesk or API:
PLESK_ERROR: New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] bind() to [2001:db8:f61:a1ff:0:0:0:80]: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
Nginx configuration tests are done too early before the IPv6 address is fully added to the system. This is a bug with ID #PPPM-10118 which is planned to be fixed in future updates.
As a workaround:
Connect to the server via SSH
Check the configuration for both Ngnix and Apache manually after adding the IP address with the commands:
# /opt/psa/admin/bin/nginx-config -t
# /opt/psa/admin/bin/apache-config -t
Add the following string to file
CONFIG_TEXT: net.ipv6.ip_nonlocal_bind = 1
Note: This directive allows daemons to bind to non-existing IPv6 network interfaces.
Restart nginx service:
# service nginx restart