Fix Nginx 413 : Request Entity Too Large
Posted on August 7, 2017 • 1 minutes • 115 words • Suggest Changes
It’s not the first time I received this error. It is the error you receive when the file (or large input in general) you tried to upload is too large and the server is declining it. Here is how you can fix it :
Open your server {} specific config file for nginx :
nano /etc/nginx/conf.d/svennd.conf
and add, 10M is ~10MB.
client_max_body_size 10M;
Note that PHP also has an upload limit (see the docs).
Reload Nginx to activate :
service nginx reload or systemctl reload nginx
note that clent_max_body_size can be in both http and server context, I prefer server as it is more specific.
Alternative error :
client intended to send too large body