One, Nginx server
Nginx This problem occurs because the request entity is too long. It is common to have a POST request when the body content post data is too large,
such as uploading large files too large, post data 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.
The code is as follows:
# Modify the following configuration in the Http,server or Location section:
# Set client body size to 8M #
Client_max_body_size 8M;
Second, Apache server
Modify the Limitrequestbody configuration in the next Apache configuration file, and if it is a virtual host, contact the space vendor to help you modify it.
Specific steps:
When uploading large software in the Apache environment, there are sometimes 413 errors, the cause of this error is due to improper configuration of Apache, to find the Apache configuration file directory is the Conf directory, A directory parallel to this directory is called CONF.D Open this conf.d, there is a php.conf
The contents of the catalogue are as follows:
The code is 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 would be served as directory
# indexes.
#
DirectoryIndex index.php
The error occurs on this limitrequestbody configuration, and the value is changed to be larger than the size of your software.
If you do not have this configuration file,
The code is as follows: Setoutputfilter PHP
Setinputfilter PHP
Limitrequestbody 6550000
Write to the Apache configuration file.
Third, IIS server (Windows Server 2003 System IIS6)
Stop the IIS Admin Service services, and then
Locate the windows\system32\inesrv\ under MetaBase.xml, open, locate aspmaxrequestentityallowed modify the value that you want, and then restart the IIS Admin service services
1. The Web service extension allows Active Server Pages and the server-side include documents
2, modify the properties of each site home directory-configuration-options-Enable parent path
3, so that it can upload large documents (modified to the size you want to, in bytes)
C:\WINDOWS\system32\inetsrv\MetaBase.xml
! The enterprise version of windows2003 on line No. 592
Default pre-set value aspmaxrequestentityallowed= "204800" is 200K
Add two 0, that is, now the largest can upload 20M.
The code is as follows: aspmaxrequestentityallowed= "20480000"
Nginx, Apache, IIS server resolve 413 Request Entity Too Large Problem Method summary