• 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
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more 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