ModSecurity: Request body is larger than the configured limit

Some users may experience problems when uploading large files via a webpage. The resultant errors often look like this:

Request body is larger than the configured limit (134217728).

This is because the request body’s default maximum size is set lower than the size that was submitted. A detailed explanation of how and why this directive is used can be found here:

To work around the issue create a .htaccess file in the same directory as the page causing the issue. Insert one of the following lines:

LimitRequestBody 0 ## unlimited up to 2GB
LimitRequestBody 2097152 ## 2 MB, decent default for many cases.

and save this file. If you increased the size correctly the page should now be working.


One Response to “ModSecurity: Request body is larger than the configured limit”

  1. CarlParry says:

    SOLVED. FIXED. Perfect thanks. I have a meme website on dreamhost where people can customise their memes. When I googled this problem there were so many suggestions that crashed my website – but yours worked so I have added a couple of “signatures” that should promote your fix above the others that don’t work.

    Thanks again,

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge