How to log Request & Response bodies using mod_security module in Apache Httpd?

Solution Verified - Updated -

Issue

  • I want to log both request & response bodies in the mod_security audit log in Apache Httpd.
  • I am unable to print the request & response bodies in the audit log created by the mod_security module.

Environment

  • Red Hat Enterprise Linux (RHEL) 7.9, 8.6, 9.0
    • mod_security
  • Red Hat JBoss Core Services (JBCS) Apache 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