How to fix 413 error: Request Entity Too Large in Nginx
This error occurs when the size of transferred file exceeds 1 megabyte. It happens because Nginx directive client_max_body_size is set to 1M by default.
client_max_body_size directive specifies the maximum accepted body size of a client request indicated by the request header Content-Length.
If content length is greater than specified limit, the client receives 413 error: "Request Entity Too Large". It's also known that web browsers don't usually know how to display this error properly.
To solve this change client_max_body_size directive in nginx.conf file:
client_max_body_size 100m;and restart nginx.
This work is licensed under a Creative Commons Attribution-NoDerivs 3.0 United States License.
Got a comment?
All Rights Reserved.