Plesk: Allow large file uploads
To allow large file uploads with Plesk some changes are necessary. If you use Cloudflare there is also an upload restriction directly from Cloudflare. In this case you would have to bypass Cloudflare for your own IP.
We need to adjust the Apache and nginx configuration. In the example below, we assume that the file “/usr/local/psa/admin/conf/panel.ini” does not exist yet, so we copy the template first.
echo 'client_max_body_size 2048m;' > /etc/nginx/conf.d/aa_client_max_body.conf
cp /usr/local/psa/admin/conf/panel.ini.sample /usr/local/psa/admin/conf/panel.ini
chmod 644 /usr/local/psa/admin/conf/panel.ini
echo -e "[webserver]n nginxClientMaxBodySize =2048mn" >> /usr/local/psa/admin/conf/panel.ini
plesk sbin httpdmng --reconfigure-all
service nginx restart
echo 'LimitRequestBody 2147483647' > /etc/apache2/apache2.conf
service apache2 restart
In Plesk we still have to adjust the “Apache & nginx settings” under the corresponding domains, as additional Apache settings (http and https) we enter:
<IfModule mod_fcgid.c>
FcgidMaxRequestLen 2147483647
FcgidMaxRequestsPerProcess 100
FcgidProcessLifeTime 7200
FcgidIOTimeout 7200
FcgidMaxRequestInMem 2147483647
</IfModule>
LimitRequestBody 2147483647
As additional nginx settings we enter:
client_body_timeout 3600;