Nginx 413 Request Entity Too Large

Source: Internet
Author: User

In the upload, Nginx returned 413 error, look at the log file, the error message displayed is: "413 Request Entity Too Large", the following settings need to be done:

Open Nginx Main profile nginx.conf, find http{} segment, add client_max_body_size related settings, this value by default is 1m, can be increased to 3m to increase the file size limit;

Client_max_body_size 3m;
Client_body_buffer_size 128k;
Proxy_connect_timeout 600;
Proxy_read_timeout 600;
Proxy_send_timeout 6000;
Proxy_buffer_size 16k;
Proxy_buffers 4 64k;
Proxy_busy_buffers_size 64k;
Proxy_temp_file_write_size 64k;

If you are running PHP, then also check the php.ini, this size client_max_body_size to and php.ini in the following values of the maximum value of the same or slightly larger, so that the submission of data is not inconsistent with the size of the error.
Post_max_size = 6M
Upload_max_filesize = 2M

Nginx 413 Request Entity Too Large

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.