This article is a mirror article of machine translation, please click here to jump to the original article.

View: 11496|Reply: 0

[Web] Tip: Workaround for 413 Request Entity Too Large

[Copy link]
Posted on 1/29/2016 11:09:18 AM | | |

Nginx server

The reason is that the requesting entity is too long. Generally, the data of the Body content Post is too large when the Post is requested

For example, uploading large files is too large; For example, there is more POST data

Change the value of nginx.conf to solve the problem.

client_max_body_size 2M to  
client_max_body_size 10M

Apache server

Modify the LimitRequestBody configuration in the Apache configuration file, and if it is a virtual host, contact the space provider to help modify it.

Specific steps:

When uploading large software in the Apache environment, sometimes there will be a 413 error, the reason for this error is due to the improper configuration of Apache, find the Apache configuration file directory is the conf directory, and a directory parallel to this directory is called conf.d to open this conf.d, which contains a php.conf
The contents of the table of contents are as follows:
#
# PHP is an HTML-embedded scrip{filtering}ting 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 will be served as directory
# indexes.
#
DirectoryIndex index.php

The error occurs on this LimitRequestBody configuration, just change the value to larger than the size of your software

If you don't have this profile, please will
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 6550000

Just write it to the apache configuration file.

IIS Server (Windows Server 2003 IIS6)

First stop the IIS Admin Service service, and then
Find the metabase.xml under windows\system32\inesrv\, open it, find ASPMaxRequestEntityAllowed to modify to the required value, and then restart the IIS Admin Service service

1. Extension in the web service allows active server pages and contains documents on the server side
2. Modify the properties of each site Home Directory - Configuration - Options - Enable Parent Path
3. Make it possible to upload large documents (modify to the size you want, in bytes)
c:\WINDOWS\system32\inetsrv\MetaBase.xml

! Enterprise Windows 2003 on line 592
The default default value of AspMaxRequestEntityAllowed="204800" is 200K

Add two 0s to it, that is, it will change, and now you can upload up to 20M.
AspMaxRequestEntityAllowed="20480000"




Previous:Microsoft.Office.Interop.Word document dynamically generates tables
Next:[Practice OK] Plugin FEDERATED is disabled, don't pay attention to this, it's okay.
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com