I use Rails and Nginx in the digital ocean, and I try to download a 17.6 MB file, and I still get 413 Request Entity Too Large even after setting client_max_body_size 100M in my /etc/nginx/nginx.conf file.
Here is a snippet from the file:
http { ## # Basic Settings ## client_max_body_size 100M; sendfile on; tcp_nopush on; ... }
After setting this parameter, I used sudo service nginx reload . When this did not work, I even performed a complete reboot using sudo shutdown -r now , and then cap production puma:start from my local machine. I also tried client_max_body_size 0; , which, as I understand it, should completely disable file size checking. Nothing works. Plus, I made some errors in the location of the client_max_body_size operator, and in cases where the server could not start to throw the error "Something went wrong", so I'm sure that the changes that I make are in the correct file .
Is there anything I can lose? Is there any other place that I am missing to set this up? Is there something that I am missing in the way I configure it? Any pointers would be greatly appreciated.
source share