Engine reference

ModSecurity engine documentation

Practical documentation for ModSecurity configuration, rule language, request processing, logging, and troubleshooting.

ModSecurity evaluates HTTP transactions using configuration directives and SecRule statements. Start with the overview, then open the part of the language you need.

Version matters: ModSecurity 2.x and libmodsecurity 3 share most rule-language concepts, but directives and connector behavior are not identical. Each deployment guide should be checked against your engine and connector version.

Configuration

Core ModSecurity configuration

Understand engine mode, request and response body inspection, limits, audit logging, and a safe rollout sequence.

Read guide →
Rule language

ModSecurity rule language

Learn SecRule anatomy, variables, operators, transformations, actions, chains, phases, and macro expansion.

Read guide →
Operations

ModSecurity logging and troubleshooting

Read audit events, identify a rule match, distinguish detection from disruption, and troubleshoot safely.

Read guide →
Directive reference

ModSecurity configuration directives

A practical reference to engine, body inspection, limits, audit logging, uploads, remote rules, and rule-management directives.

Read guide →
Variable reference

ModSecurity variables and collections

Reference request, response, connection, rule, transaction, persistent, and file variables used by SecRule.

Read guide →
Operator reference

ModSecurity operators

Reference string, regular-expression, numeric, network, validation, lookup, and inspection operators.

Read guide →
Transformation reference

ModSecurity transformations

Normalize encoded and evasive input before matching while preserving the original transaction data.

Read guide →
Action reference

ModSecurity actions and rule flow

Reference disruptive, logging, metadata, flow, control, and state actions used by SecRule.

Read guide →
Tuning

Rule exclusions and safe tuning

Fix false positives with narrow target exclusions, transaction controls, and maintainable local configuration.

Read guide →