Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Request body (Content-Length) is larger than the configured limit?

I have a file uploading site and am getting this error when trying to upload files larger than 400MB. Does anyone know where I can set this value? I also have ModSecurity Disabled for this account so I don't know why MS is catching this in the first place!

Thank you

like image 433
user1446650 Avatar asked Dec 14 '12 23:12

user1446650


2 Answers

I heard setting a default for apache in httpd.conf for the LimitRequestBody config variable might work.

or maybe not applicable to you but if mod_security is enabled:

/etc/httpd/conf.d/mod_security.conf

Has this: SecRequestBodyLimit 131072 Change to (6MB), or what ever size you want to allow: SecRequestBodyLimit 6000000"*

like image 101
armyofda12mnkeys Avatar answered Nov 29 '22 08:11

armyofda12mnkeys


I face this problem too in Centos 7 / DirectAdmin so. First you should change two variable

  • SecRequestBodyLimit
  • SecRequestBodyNoFilesLimit

you can try this path

/etc/httpd/conf.d/mod_security.conf

so you can edit this file in CentOS/DirectAdmin

nano /etc/httpd/conf/extra/httpd-modsecurity.conf

press Ctrl+W and search for

SecRequestBodyLimit

then change

SecRequestBodyLimit 131072
SecRequestBodyLimit 131072

to

SecRequestBodyLimit 8388608
SecRequestBodyLimit 8388608

Note: 131072 = 127KB , 8388608 = 8MB

Hoe this work for you too.

like image 32
GameO7er Avatar answered Nov 29 '22 08:11

GameO7er