Fix: Nginx 413 Request Entity Too Large
Add `client_max_body_size 50M;` to the location
413 comes from `client_max_body_size`. Default is 1MB — raise it on the server/location block, and match the setting on any upstream app.
Frequently Asked Questions
What causes Nginx 413 Request Entity Too Large?
413 comes from `client_max_body_size`. Default is 1MB — raise it on the server/location block, and match the setting on any upstream app.
How to fix Nginx 413 Request Entity Too Large?
Set `client_max_body_size 50M;` in the relevant `server {}` or `location {}` block and reload nginx. Also confirm the upstream app accepts the same size.
Example fix from Kintify Fix
Input: File upload over 1MB returns 413
Output: Set `client_max_body_size 50M;` in the relevant `server {}` or `location {}` block and reload nginx. Also confirm the upstream app accepts the same size.
Used by developers debugging real production systems