Nginx appears 413 Request Entity Too Large error, this error generally occurs when uploading a file, open nginx main configuration file nginx.conf, find http{} segment, add
The solution is
Open nginx Main configuration file nginx.conf, generally in/usr/local/nginx/conf/nginx.conf this location, find http{} segment, modify or add
Client_max_body_size 2m;
then restart Nginx,
Sudo/etc/init.d/nginxd Reload
can be.
If you are running in PHP, this size client_max_body_size to be approximately or slightly larger than the maximum value in php.ini, so that there is no error in the size of the commit data.
Post_max_size = 2mupload_max_filesize = 2M
re-start Nginx
Kill-hup ' Cat/usr/local/nginx/nginx.pid '
when uploading large files in order to prevent the time-out phenomenon of slow speed, it is necessary to adjust the value of max_execution_time.
The above describes the Nginx appears 413 Request Entity Too Large error resolution, including the content, I hope to be interested in PHP tutorial friends helpful.