Tag Archives: Nginx Technology

Nginx upload error 413 request entity too large

By default, when using nginx reverse proxy to upload more than 2MB files, an error 413 request entity too large will be reported. To solve this problem, it is very simple to modify the configuration of client_ max_ body_ The size value is enough

Modify nginx.conf

 
 

1 2 #cat /usr/local/nginx-1.7.0/conf/nginx.conf | grep client_ max_ body_ size client_ max_ body_ size 10M;

If you need to upload a larger file, the client_ max_ body_ The size can be changed to a larger value. Here it is changed to 10MB

Restart nginx

 
 

1 # /usr/local/nginx-1.7.0/sbin/nginx -s reload