nginx 413 Request Entity Too Large

October 2, 2010

One of my sites lets users upload photos using the Django admin site. It limits to four photos at once, but still gave the error 413 Request Entity Too Large whilst uploading four.

It turns out the default maximum limit for upload site is 1Mb in nginx.

To change this for all sites, put the following in the http block of nginx.conf

client_max_body_size 3M;

Tags: nginx 413 upload