Plesk

[BUG] nginx shows configuration error in Plesk: “proxy_read_timeout” directive is duplicate

Symptoms

Cause

Product 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:

Resolution

Please consider updating your server:

Workaround

  1. 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 button > Set the Status filter to Error from the drop-down menu.

  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 interface

 

  1. 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