Unable to activate nginx server support, the following error appears:
# /usr/local/psa/admin/bin/nginxmng -e ... Config (13523804010.47553900) generation failed: nginx: [emerg] open() "/var/www/vhosts/example.com/statistics/logs/proxy_access_ssl_log" failed (24: Too many open files) nginx: configuration file /etc/nginx/nginx.conf test failed # /etc/init.d/nginx restart Not starting nginx as it is disabled in config
Plesk GUI also shows the following error:
New configuration files for the Apache web server were not created due to the errors in configuration templates: Template processing failed: The error message containing the detailed error descriptions was sent to you by e-mail. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files.
Nginx reached limit of files to handle.
- Some domains had previously saved links to nginx configuration files, but configuration files are missing on the server.
'worker_rlimit_nofile'in the Nginx configuration to increase the maximum number of opened files allowed by the worker process:
# grep worker_rlimit_nofile /etc/nginx/nginx.conf worker_rlimit_nofile 65536;
In case if some configuration is present for domains that are not present in Plesk the select will be not null:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa -e "select c.id, c.objectId as 'domain_id' from Configurations c left join domains d on c.objectId=d.id where c.objectType in ('domain', 'nginxDomain') and d.id is null"
To remove such extra configuration use Webserver Configuration Troubleshooter extension, filter out all erroneous configurations with the help of the "Show Errors" button and remove them using the "Remove" button. Then click the "Rebuild All" button to rebuild the configurations.
Repair vhost structure:
# /usr/local/psa/bin/repair --update-vhosts-structure
Enable Nginx support by Plesk:
# /usr/local/psa/admin/bin/nginxmng -e