• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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