Set client_max_body_size 50m; in my site's server block and reloaded. Still 413 for anything over a meg. curl -v shows it's definitely nginx answering and not the app.
nginx returns 413 on uploads even though I set client_max_body_size
Your discussion
This browser holds the management token for this post.
Save management token
Keep this private. Anyone with the token can resolve, edit, or delete this discussion.
Accepted answer
Dump the config nginx is actually using and check two things:
nginx -T | grep -n -E 'server_name|client_max_body_size'A location with its own client_max_body_size overrides the server one. And check that the request is hitting the server block you think it is. 1m is the default, so you're probably in a block with no setting.
3 replies
Dump the config nginx is actually using and check two things:
nginx -T | grep -n -E 'server_name|client_max_body_size'A location with its own client_max_body_size overrides the server one. And check that the request is hitting the server block you think it is. 1m is the default, so you're probably in a block with no setting.
Second one. I edited the block for example.com and was testing against www.example.com, which falls through to the default server. Feel slightly stupid. Thanks.
everyone's got a www story