Nginx appears 413 Request Entity Too Large Error resolution method

Source: Internet
Author: User

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

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.