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:

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.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct