Solution to 413 Request Entity Too Large error handling, 413 entity

Source: Internet
Author: User

Solution to 413 Request Entity Too Large error handling, 413 entity
Idea 1: Modify nginx Configuration This is the simplest way. The error is that nginx does not allow uploading files with too many configuration items, so you can increase the nginx upload size configuration.1. Open the nginx main configuration file nginx. conf. Generally, in the/usr/local/nginx/conf/nginx. conf location, locate the http {} segment and modify the following content: [Html]View plain copy

Client_max_body_size2m;Change the value of 2 m to the allowed file size you need.2. Check whether the nginx configuration is correct after modification.[Html]View plain copy

/Usr/local/nginx/sbin/nginx-t3. After testing the correct configuration, restart nginx to make the configuration take effect.[Html]View plain copy

/Etc/init. d/nginxrestartNOTE: If it is run in php, The client_max_body_size value must be the same or slightly larger than the following value in php. ini, so that the error will not occur because the submitted data size is inconsistent.[Html]View plain copy

Post_max_size = 2Mupload_max_filesize = 2 M

Change the value of 2 m to the allowed file size you need. Change 2 m to the size you set in the first step.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.