Applicable to:
- Plesk for Linux
Symptoms
-
Uploading of big size file fails with the following error in
/var/www/vhosts/system/example.com/logs/proxy_error_log
or/var/log/nginx/error.log
file:CONFIG_TEXT: client intended to send too large body: 163625628 bytes, client: 203.0.113.2, server: example.com, request: "POST /attachments/uploading.json?hash=bb192e03d44f11110881f1c148ef629&content_type=resource_version&key=resource HTTP/1.1", host: "203.0.113.2", referrer: "https://203.0.113.2/resources/add?resource_category_id=13"
-
Unable to upload file using an Application or in webmail:
PLESK_WARN: An error occurred!
File upload failed -
The following error can be seen in the browser's console:
CONFIG_TEXT: 413 Request Entity Too Large
Cause
Value for client_max_body_size
is not enough. By default, it is 128MB.
Resolution
-
Connect to the server via SSH.
-
Add the following directives to
/usr/local/psa/admin/conf/panel.ini
file using 'vi' utility to customize Plesk defaults:CONFIG_TEXT: [webserver]
nginxClientMaxBodySize = 2000mIf there is no
/usr/local/psa/admin/conf/panel.ini
file, create it from the sample file:# cp /usr/local/psa/admin/conf/panel.ini.sample /usr/local/psa/admin/conf/panel.ini
-
Rebuild web server configuration files:
# plesk repair web -server
-
Adjust settings of PHP handler assigned to the domain. Log in to Plesk, go to Tools & Settings > PHP Settings > X.X.XX FPM application in php.ini tab and adjust the following parameters, e.g.:
CONFIG_TEXT: post_max_size 2000m
upload_max_filesize 2000m
max_file_uploads 100 -
Try to upload file again. Incase uploading also fails proceed with the next steps:
-
Restart nginx:
# service nginx restart
Comments
2 comments
Hello Francesc Benavent
You're right, I will adjust the article.
In Plesk Obsidian 18.0.29, the default value for nginxClientMaxBodySize is :
as stated by the "panel.ini editor" extension.
Please sign in to leave a comment.