Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Notes / Whitelist mod security false positives

Whitelist mod security false positives

In vhost.conf:
<LocationMatch super.php>
<IfModule mod_security2.c>
    SecRuleRemoveById 981204
</IfModule>
</LocationMatch>
<LocationMatch /path/file.php>
<IfModule mod_security2.c>
    SecRuleEngine Off 
</IfModule>
</LocationMatch>
<LocationMatch .*>
<IfModule mod_security2.c>
     SecRuleRemoveByMsg "SQL Comment Sequence Detected"
</IfModule>
</LocationMatch>
# Remove rules
<LocationMatch .*>
<IfModule mod_security2.c>
    SecRuleRemoveById 981204
</IfModule>
</LocationMatch>