Nginx error: client intended to send too large body Nginx error: client intended to send too large body ruby-on-rails ruby-on-rails

Nginx error: client intended to send too large body


For me path of nginx.conf was /etc/nginx/nginx.conf.

In my case I just added client_max_body_size in http block and it worked for me

http {    ...    client_max_body_size 20M;}    

Make sure to restart nginx after changing this config


Default Nginx config limits client request body with 1Mb.
You have to increase client_max_body_size to allow users to post large documents.
Don't miss with the context (http, server, location) of this derictive and don't forget to reload configuration or restart Nginx after that.