Nginx appears 413 Request Entity Too Large Error resolution method

Source: Internet
Author: User
Tags php tutorial
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.

  • 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.