Nginx, Apache, IIS server resolves 413 Request Entity Too Large problem method Rollup _nginx

Source: Internet
Author: User
Tags nginx server metabase

First, Nginx server

Nginx This problem occurs because the request entity is too long. The general occurrence of a POST request is that the body content post data is too large,
such as uploading large files too large, post data is more.

Processing methods

In nginx.conf add client_max_body_size settings, this value defaults to 1m, can be increased to 8m to increase the file size limit, of course, you can set a larger point.

Copy Code code as follows:

# Modify the following configuration in the Http,server or Location section:
# Set client body size to 8M #
Client_max_body_size 8M;


two, the 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:

Copy Code code 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

Copy Code code as follows:
Setoutputfilter PHP
Setinputfilter PHP
Limitrequestbody 6550000

Write to Apache's configuration file.

Third, 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.

Copy Code code as follows:
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.