Saturday, July 12, 2008

Uploading large file to nginx server

If you upload a file over 1M in size to a nginx server, you might get a "Request Entity Too Large" (413) error.
We can overcome this problem by specifying the client_max_body_size in nginx.conf

nano /etc/nginx/nginx.conf

under "server {"
add the following line

client_max_body_size 5M

this will change the max file size to 5M, you can change that number to whatever you like.


J

No comments: