Increase upload file size limit
We are running a PHP application on SOLAR_Test_Server (LEMP).
In order to increase the capacity of File upload we have performed the following:-
in etc/php.ini set
upload_max_filesize = 1074M
post_max_size = 1081M
in /etc/nginx/nginx.conf set, at the http level
client_max_body_size 1074M;
Then rebooted SOLAR_Test_Server.
However, when we attempt to upload a file over 100M we get
413 Request Entity Too Large
What parameters are we still missing?
1 Reply
I would check to make sure that no other configurations or applications are currently overriding your /etc/php.ini or etc/nginx/nginx.conf and that your modifications have been persistent past your server restart.
Additionally, StackOverflow posts suggest that you should individually check your HTTP, Server, and Location blocks to ensure you have increased your limits as-needed and haven't restricted your intended upload size:
- php - How to avoid Request Entity Too Large 413 error - Stack Overflow
- php - 413 Request Entity Too Large - File Upload Issue - Stack Overflow
When all else fails, it never hurts to review your NGINX logs (/var/log/nginx/error.log) to see if they contain any more verbosity about the issue.