: This article describes how to solve the 413RequestEntityTooLarge problem in nginx. For more information about PHP tutorials, see. Solution to the 413 Request Entity Too Large problem in nginx
The nginx: 1.9 Request Entity Too Large error occurs when uploading images (413 MB in size) using php.
Based on experience, the server limits the size of the uploaded files, but the default php file upload is 2 MB, so there should be no problems.
Open php. ini, change upload_max_filesize and post_max_size to 20 MB, and restart.
Upload again. The problem persists. you can solve the php problem.
The default size of the uploaded files in nginx is 1 MB, which can be modified in nginx settings.
The solution is as follows:
1. open the nginx configuration file nginx. conf. The path is usually/etc/nginx. conf.
2. add client_max_body_size 20 m to the http {} segment, and 20 m to the maximum upload size.
3. save and restart nginx to solve the problem.
The above describes how to solve the 413 Request Entity Too Large problem in nginx, including some content, and hope to help friends who are interested in PHP tutorials.