Apache HTTPD 413 Request Entity Too Large error with mod_security

Solution Verified - Updated -

Issue

  • When using the Apache HTTPD from JBoss Core Services and ModSecurity is enabled, this error is returned to browser sometimes:

    The requested resource /path/to/my/app does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.
    
  • In Apache HTTPD error log:

    [Mon Jan 01 01:01:01 2018] [:error] [pid ****] [client 10.10.10.10:47496] [client 10.10.10.10] ModSecurity: Request body no files data length is larger than the configured limit (131072).. Deny with code (413) [hostname "example.com"] [uri "/path/to/my/app"] [unique_id "*********"], referer: https://example.com/path/to/my/app?
    

Environment

  • Red Hat Enterprise Linux (RHEL)
  • Red Hat Software Collections (RHSCL)
  • Red Hat JBoss Core Services (JBCS)
  • Apache Web Server (HTTPD)
    • mod_security

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content