I'm using Rails and Nginx on Digital ocean and I've been trying to upload a 17.6 MB file and I'm still getting 413 Request Entity Too Large
even after setting client_max_body_size 100M
in my /etc/nginx/nginx.conf file.
Here's the snippet from the file:
http {
##
# Basic Settings
##
client_max_body_size 100M;
sendfile on;
tcp_nopush on;
...
}
After setting this I've used sudo service nginx reload
. When that didn't work I've even done a full reboot using sudo shutdown -r now
and then cap production puma:start
from my local machine. I've also tried client_max_body_size 0;
which, from what I understand should disable checking of file sizes entirely. Nothing works. Plus, in getting to this point, I've made some mistakes in the location of the client_max_body_size
statement and in those situations the server has failed to start correctly giving a "Something went wrong" error, so I'm pretty sure the changes I'm making are to the right file.
Is there something I might be missing? Is there another place I'm missing to configure this? Is there something I'm missing in the way I'm currently configuring it? Any pointers would be greatly appreciated.