Symptoms
-
One of the following symptoms is true:
-
It is not possible to add proxy_read_timeout to the Additional nginx directives field at Domains > example.com > Apache & nginx settings with the following error message:
PLESK_ERROR: Invalid nginx configuration: nginx: [emerg] “proxy_read_timeout” directive is duplicate in /var/www/vhosts/system/example.com/conf/vhost_nginx.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed
-
The following error message is shown on the Home page in Plesk:
PLESK_ERROR: New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] “proxy_read_timeout” directive is duplicate in /var/www/vhosts/system/example.com/conf/vhost_nginx.conf:3 nginx: configuration file /etc/nginx/nginx.conf test failed .
-
-
The max_execution_time value is customized at Domains > example.com > PHP Settings (Reset to Default option is shown):
Cause
The proxy_read_timeout nginx directive has the same value as max_execution_time in PHP Settings. When max_execution_time is set to a non-default value, the proxy_read_timeout directive is automatically added to /var/www/vhosts/system/example.com/conf/nginx.conf
.
This is Plesk bug ID #PPPM-12599Â which is going to be fixed in future Plesk updates.
Note: Subscribe to the article to get notified once a fix will become available
Resolution
-
Use one of the following steps to remove the duplicate directive:
-
Reset the max_execution_time value to default at Domains > example.com > PHP Settings and specify proxy_read_timeout in the Additional nginx directives field at Domains > example.com > Apache & nginx settings
-
Remove the proxy_read_timeout (if defined) from the Additional nginx directives field at Domains > example.com > Apache & nginx Settings and adjust max_execution_time in domain’s PHP Settings.
-
-
Go to Tools & Settings > Webserver Configurations Troubleshooter
-
Click the
button > Set the Status filter to Error from the drop-down menu.
- The list of broken configuration files will appear. Select all and click Rebuild > Selected