ruby on rails - Still getting 413 Request Entity Too Large even after client_max_body_size 100M -
i'm using rails , nginx on digital ocean , i've been trying upload 17.6 mb file , i'm still getting 413 request entity large
after setting client_max_body_size 100m
in /etc/nginx/nginx.conf file.
here's snippet file:
http { ## # basic settings ## client_max_body_size 100m; sendfile on; tcp_nopush on; ... }
after setting i've used sudo service nginx reload
. when didn't work i've done full reboot using sudo shutdown -r now
, cap production puma:start
local machine. i've tried client_max_body_size 0;
which, understand should disable checking of file sizes entirely. nothing works. plus, in getting point, i've made mistakes in location of client_max_body_size
statement , in situations server has failed start correctly giving "something went wrong" error, i'm pretty sure changes i'm making right file.
is there might missing? there place i'm missing configure this? there i'm missing in way i'm configuring it? pointers appreciated.
okay. figured out. following digital ocean guide how configure nginx, setting client_max_body_size 100m
in file /etc/nginx/nginx.conf
. , sure, changing things there had impact on server did. when mess in file , server stopped functioning.
however, had forgotten in deploying rails app on ubuntu 14.04 capistrano, nginx, , puma main resource setting server, shows these parameters set not in above nginx.conf
rather in rails app there file ~/my_app/config/nginx.conf
in setup parameters included statement
client_max_body_size 10m;
so changed statement in /etc/nginx/nginx.conf
file on production. voila! can upload files 100m.
Comments
Post a Comment