Nginx 413 Request Entity Too LargeHow do I fix this problem and allow image upload upto 2MB in size?
The client_max_body_size directive assigns the maximum accepted body size of client request, indicated by the line Content-Length in the header of request. If size is greater the given one, then the client gets the error "Request Entity Too Large" (413). To fix this issue edit your nginx.conf, enter:
# vi /usr/local/nginx/conf/nginx.conf
Add the following to increase the size limit in nginx.conf, enter:
Save and close the file. Reload the nginx webserver, enter:
client_max_body_size 2M;
# /usr/local/nginx/sbin/nginx -s reload
No comments:
Post a Comment