How to Enable Mod_Security in cPanel
Posted about 4 months ago 3.6kWhat is ModSecurity
Web Application Firewall: Protects against common attacks (SQLi, XSS).
Enable in WHM (Root Required)
WHM → Security Center → ModSecurity → Enable for all vendors.
Per-Domain Control (If Available)
Some hosts allow disabling for specific domains if false positives occur.
Handling False Positives
Check ModSecurity Hits
Look in ModSecurity Tools → Hits List → Find rule ID → Disable specific rule.
Protection Types Table
| Attack Type | Blocked By |
|---|---|
| SQL Injection | SQLi rules |
| XSS | Scripting rules |
| Path Traversal | File access rules |
| Brute Force | Combined with cPHulk |