Apache

ModSecurity for Apache

Install the embedded ModSecurity module, load a maintained rule set, and validate it safely on Apache.

Apache is the most direct ModSecurity deployment: the 2.x engine runs as a web-server module and evaluates requests inside Apache.

Deployment checklist

  1. Install the packaged mod_security or libapache2-mod-security2 module.
  2. Confirm Apache includes the ModSecurity configuration directory.
  3. Install and update one rule feed; do not load duplicate rule IDs.
  4. Begin with SecRuleEngine DetectionOnly on an existing production application.
  5. Review audit events, make narrow application-specific exclusions, then enable blocking.

Avoid globally disabling rule classes to solve a single endpoint problem. A targeted exclusion keeps protection everywhere else.