Upload file prompts 413 Request Entity Too Large Error

Source: Internet
Author: User
Tags nginx server metabase

Nginx Server


The reason is that the request entity is too long. The general occurrence is that the body content post data is too large for post requests
such as uploading large files too large; If more post data
The processing method modifies the value of the nginx.conf to be resolved.
Client_max_body_size 2M instead
Client_max_body_size 10M

Apache Server


Modify the Limitrequestbody configuration in the Apache configuration file, and if it is a virtual host, please contact the space provider to help with the modification.
Specific steps:
In the Apache environment upload larger software, sometimes there will be 413 errors, the reason for this error is due to the improper configuration of Apache, found Apache configuration file directory is the Conf directory, A directory parallel to this directory called CONF.D to open this conf.d, which has a php.conf
The contents of the directory are as follows:
# PHP is a html-embedded scripting language which attempts to make it
# Easy for developers to write dynamically generated webpages.
LoadModule Php4_module modules/libphp4.so
# cause the PHP interpreter handle files with a. php extension.
Setoutputfilter PHP
Setinputfilter PHP
Limitrequestbody 6550000
# ADD index.php to the list of files, that'll be served as directory
# indexes.
#
DirectoryIndex index.php
The error occurs on this limitrequestbody configuration, changing the value of this to more than the size of your software
If you do not have this configuration file, set the
Setoutputfilter PHP
Setinputfilter PHP
Limitrequestbody 6550000
Write to Apache's configuration file.

IIS Server (Windows Server 2003 System IIS6)


Stop the IIS Admin service first, and then
Find the MetaBase.xml under windows/system32/inesrv/, open, find aspmaxrequestentityallowed modify to the desired value, and then restart the IIS Admin service
1. Allow Active Server Pages and included documents on the server side in Web service extensions
2, modify the site's Properties home directory-Configuration-options-enable the parent path
3, so that it can upload a large document (modified to the size you want it can, in bytes)
C:/windows/system32/inetsrv/metabase.xml
! Enterprise version of windows2003 in line No. 592
Default preset value aspmaxrequestentityallowed= "204800" or 200K

Add two to 0, that is, now the maximum can be uploaded 20M.
Aspmaxrequestentityallowed= "20480000"

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.