The error "413 Request Entity Too Large" is returned when the file is uploaded.

Source: Internet
Author: User
Tags nginx server metabase

Today, I found that the 413 Request Entity Too Large error was prompted when uploading files on the website. I have previously introduced the error 413 Request Entity Too Large when uploading Large files on nginx, next I will summarize the common solutions for nginx, apache, and iis.

Nginx Server


The reason is that the request entity is too long. Generally, when a Post request is sent, the Body contains too much Post data.
The uploaded large file is too large. For example, there are too many POST data.
Modify the nginx. conf value to solve the problem.
Change client_max_body_size 2 M
Client_max_body_size 10 M

Apache server


Modify the LimitRequestBody configuration in the Apache configuration file. If it is a virtual host, contact the space provider for help.
Procedure:
When uploading large software in the apache environment, the 413 error may occur sometimes. The cause of this error is caused by improper configuration of apache, find the configuration file directory of apache, that is, the conf directory. A directory parallel to this directory is called conf. d. Open the conf file. d. There is a php in it. conf
The directory content is as follows:
# PHP is an 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 will be served as directory
# Indexes.
#
DirectoryIndex index. php
The error occurs in the LimitRequestBody configuration. You can change the value to a value greater than the size of your software.
If you do not have this configuration file
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 6550000
Write it to the apache configuration file.

IIS Server (Windows Server 2003 system IIS6)


Stop the IIS Admin Service first, and then
Find metabase. xml under windows/system32/inesrv/, open it, find ASPMaxRequestEntityAllowed and change it to the desired value, and then restart the IIS Admin Service.
1. web service extensions allow active server pages and server-side documents
2. Modify the attribute home directory of each site-configuration-Option-enable parent path
3. Make it possible to upload a large document (modify it to the desired size, in bytes)
C:/WINDOWS/system32/inetsrv/MetaBase. xml
! Windows 592nd for Enterprise Edition is on line 1
Default pre-set value: AspMaxRequestEntityAllowed = "204800", that is, 200 K

Add it to two zeros, that is, change it to. Now the maximum size is 20 mb.
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.