Question: [BUG] nginx shows configuration error in Plesk: "proxy_read_timeout" directive is duplicate
Applicable to:Symptoms- The following error message is shown:
[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
when
- adding proxy_read_timeout to the Additional nginx directives field at Domains > example.com > Apache & nginx settings;
- opening the Home page in Plesk;
- repairing the web-server configuration.
The max_execution_time value is customized at Domains > example.com > PHP Settings (Reset to Default option is shown):
(https://pix.cobrasoft.org/images/2025/12/06/Screenshot_2020-03-27_PHP_Settings_for_example_com_-_Plesk_Obsidian_18_0_23.png)
- Plesk repair utility fails with:
# plesk repair web
...
Template_Exception: nginx: [emerg] "proxy_read_timeout"
directive is duplicate in
/var/www/vhosts/system/example.com/conf/vhost_nginx.conf:2
nginx: configuration file /etc/nginx/nginx.conf test failed
CauseProduct issue:
- #PPPM-12599 "Specifying custom values for both the proxy_read_timeout nginx directive and max_execution_time PHP setting for the same domain results in the max_execution_time value being substituted for the proxy_read_timeout value (e.g., adding proxy_read_timeout 1800; to "Apache&Nginx Settings" > "Additional Nginx directives" and setting max_execution_time to 90 in "PHP Settings" will result in proxy_read_timeout being set to 90 in the nginx configuration file for the domain in question)."
- Fixed in:
- Plesk Obsidian 23 November 2021 (Linux)
ResolutionPlease consider updating your server:
How to install Plesk updates
Workaround1.Log in to Plesk.
2.Apply 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.
Note: If there are a lot of domains with both directives customized, see the command-line instructions below.
3.Go to Tools & Settings > Webserver Configurations Troubleshooter
4.Click the mceclip1.png button > Set the Status filter to Error from the drop-down menu.
(https://pix.cobrasoft.org/images/2025/12/06/mceclip1-8.png)
5.The list of broken configuration files will appear. Select all and click Rebuild > Selected.
Disabling proxy_read_timeout for all domains via a command-line interface1.Connect to the Plesk server via SSH.
2.Disable proxy_read_timeout for all domains with the command:
# grep -rl "proxy_read_timeout" /var/www/vhosts/system/*/conf/ | xargs sed -i 's/proxy_read_timeout/#proxy_read_timeout/g'
3.Repair web-server configuration:
# plesk repair web -y