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

Message : ModSecurity: Request body (Content-Length) is larger than the configured limit

To resolve the issue, Modify your modsec2.conf and change the limit set for SecRequestBodyInMemoryLimit

# vi /etc/httpd/conf/modsec2.conf

Search for SecRequestBodyInMemoryLimit

SecRequestBodyInMemoryLimit 531072

Increase the value as per your need, save the file and restart the apache service.

https://wiki.iphoster.net/wiki/Apache_-_mod_security_-_Request_body_(Content-Length)_is_larger_than_the_configured_limit

https://stackoverflow.com/questions/13887812/request-body-content-length-is-larger-than-the-configured-limit
https://support.plesk.com/hc/en-us/articles/115001764933-Unable-to-upload-file-to-the-website-Request-body-no-files-data-length-is-larger-than-the-configured-limit-

https://forum.directadmin.com/threads/cwaf-request-body-no-files-data-length-is-larger-than-the-configured-limit.61157/

https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual-(v2.x)#SecRequestBodyInMemoryLimit

Leave a Comment