• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

proxy_read_timeout directive is duplicate and $VAR template objects.

brainforge

Basic Pleskian
I put values for the following into domain Additional Nginx Directives
client_max_body_size
proxy_read_timeout

I get error messages like these:
Invalid nginx configuration: nginx: [emerg] "proxy_read_timeout" directive is duplicate in ... nginx: configuration file /etc/nginx/nginx.conf test failed

I can stop that duplicate error by creating a custom conf template with those directive lines removed:
/usr/local/psa/admin/conf/templates/custom/domain/nginxDomainVirtualHost.php

But is there a better way?
The values come from variables in the template file.
Where are these variables read from?
Changing / Catching them at source and not deleting the lines in the template would most likely be better.

$VAR->domain->physicalHosting->proxySettings['nginxClientMaxBodySize']
$VAR->domain->physicalHosting->scriptTimeout

Ditto all the other $VAR - is there a document of the $VAR properties and where they come from?
 
client_max_body_size directive is duplicate and $VAR template objects.

Similarly for client_max_body_size it assigns a value of 128M to it when it builds:
/var/www/vhosts/system/mydomain.uk/conf/vhost_nginx.conf
Where is this 128M coming from?


Putting a value of 256M into 'Additional nginx directives' for the domain get a duplicate directive error.
Removing the client_max_body_size line from the custom template solves the problem.

Could get away with doing that on what could in effect be a single site server.
But no good in wider situations, there must be a more generic solution I have overlooked!

Could it be this setting in php.ini? - upload_max_filesize = 128M
But changing upload_max_filesize in domain PHP settings of Plesk does not seem to affect client_max_body_size!
 
Back
Top