I am uploading a 26Gb file, but I am getting:
413 Request Entity Too Large
I know, this is related to client_max_body_size
, so I have this parameter set to 30000M
.
location /supercap {
root /media/ss/synology_office/server_Seq-Cap/;
index index.html;
proxy_pass http://api/supercap;
}
location /supercap/pipe {
client_max_body_size 30000M;
client_body_buffer_size 200000k;
proxy_pass http://api/supercap/pipe;
client_body_temp_path /media/ss/synology_office/server_Seq-Cap/tmp_nginx;
}
But I still get this error when the whole file has been uploaded.
Best Answer
Modify NGINX Configuration File
Search for this variable:
client_max_body_size
. If you find it, just increase its size to 100M, for example. If it doesn’t exist, then you can add it inside and at the end of httpTest your nginx config changes.
Restart nginx to apply the changes.
Modify PHP.ini File for Upload Limits
It’s not needed on all configurations, but you may also have to modify the PHP upload settings as well to ensure that nothing is going out of limit by php configurations.
If you are using PHP5-FPM use following command,
If you are using PHP7.0-FPM use following command,
Now find following directives one by one
and increase its limit to 100M, by default they are 8M and 2M.
Finally save it and restart PHP.
PHP5-FPM users use this,
PHP7.0-FPM users use this,
It will work fine !!!