Symptoms
When a user attempts to upload a large file, you might encounter the following error message:
CONFIG_TEXT: 413 Request Entity Too Large
Cause
The NGINX configuration needs to be adjusted to accept larger files.
Resolution
-
Create a folder for the user, ensuring "USER" is replaced with the cPanel user:
# mkdir -p /etc/nginx/conf.d/users/USER
-
Create the file for the configuration options to reside in, replacing FILENAME with a valid file name that does not begin with "cpanel-":
# touch /etc/nginx/conf.d/users/USER/FILENAME.conf
-
Place the following line within the newly created file, adjusting the value according to your needs:
CONFIG_TEXT: client_max_body_size 32M;
-
Rebuild the Nginx configuration for the user, ensuring "USER" is replaced with the cPanel user:
# /scripts/ea-nginx config USER
Note: You may also need to adjust the upload limits for ModSecurity and PHP. You can view details on how to do so in the following support articles:
PHP File upload failed (Request Entity Too Large) [ModSecurity]
How to increase the maximum file upload size limit in PHP
Comments
0 comments
Article is closed for comments.