I keep getting "The connection was reset" when trying to upload a large file (around 135MB). When I look at the "last_nginx.conf" of the website conf directory it says "client_max_body_size 128m;" I assume that is the upload limit, so how/where do I change it? It says not to bother changing the value in that file because it will only be overwritten. Btw Nginx is enabled via Plesk admin panel.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Answer to change vhosts nginx file is this :
mkdir /usr/local/psa/admin/conf/templates/custom/domain
cp /usr/local/psa/admin/conf/templates/default/domain/nginxDomainVirtualHost.php /usr/local/psa/admin/conf/templates/custom/domain/
add in /usr/local/psa/admin/conf/templates/custom/domain/nginxDomainVirtualHost.php
:
<?php if (file_exists($VAR->domain->physicalHosting->vhostDir . '/conf/nginx.conf')): ?>
include <?php echo $VAR->domain->physicalHosting->vhostDir;?>/conf/nginx.conf;
<?php endif ?>
/usr/local/psa/admin/bin/httpdmng --reconfigure-all #
to apply new configuration for all domains
As result, if domain has conf/nginx.conf
- it will be included into virtual host config.
回答2:
client_max_body_size does not limit the size of an upload. The upload must be set by the server administrator in the .ini file or you may be able to modify the value within a .htaccess file; read this.