I have been getting the nginx error:
413 Request Entity Too Large
I have been able to update my client_max_body_size
in the server section of my nginx.conf file to 20M and this has fixed the issue. However, what is the default nginx client_max_body_size
?
The default value for
client_max_body_size
directive is 1 MiB.It can be set in
http
,server
andlocation
context — as in the most cases, this directive in a nested block takes precedence over the same directive in the ancestors blocks.Excerpt from the ngx_http_core_module documentation:
Don't forget to reload configuration by
nginx -s reload
orservice nginx reload
commands prepending withsudo
(if any).Pooja Mane's answer worked for me, but I had to put the client_max_body_size variable inside of http section.
You can increase body size in nginx configuration file as
Restart nginx to apply the changes.