Apache is the most direct ModSecurity deployment: the 2.x engine runs as a web-server module and evaluates requests inside Apache.
Deployment checklist
- Install the packaged
mod_securityorlibapache2-mod-security2module. - Confirm Apache includes the ModSecurity configuration directory.
- Install and update one rule feed; do not load duplicate rule IDs.
- Begin with
SecRuleEngine DetectionOnlyon an existing production application. - 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.