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
| The code is as follows |
Copy Code |
Client_max_body_size 2m; |
Then restart Nginx,
| The code is as follows |
Copy Code |
Sudo/etc/init.d/nginxd Reload |
Can.
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.
| The code is as follows |
Copy Code |
Post_max_size = 2M Upload_max_filesize = 2M |
Re-start Nginx
| The code is as follows |
Copy Code |
| Kill-hup ' Cat/usr/local/nginx/nginx.pid ' |
Back to Normal
Nginx appears 413 Request Entity Too Large Error resolution method