If you’re getting 413 Request Entity Too Large errors trying to upload with Nginx , you need to increase the size limit in nginx.conf . Add client_max_body_size xxM inside the server section, where xx is the size (in megabytes) that you want to allow.
http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { client_max_body_size 20M; listen 80; server_name localhost; # Main location location / { proxy_pass http://127.0.0.1:8000/; } } }
May 8, 2012 at 01:37
The HTTP server may add further restrictions on the file upload size:
Apache: You can restrict maximum file size using [LimitRequestBody] directive. Search for /etc/httpd/conf.d/php.conf and comment out LimitRequestBody. Restart Apache after editing the configuration and you will be able to attach file with sizes over 0,5 MB again.
e.g:
SetOutputFilter PHP
SetInputFilter PHP
# LimitRequestBody 524288