Disable modsec2 blacklist rule for specific hostname
- by KevinL
I have a server running Apache2 with mod_security2. In modsec2.user.conf, there is a blacklist rule:
###BLACKLIST###
SecRule REQUEST_URI "mkdir"
I need to disable that rule for just one hostname on the server. I realize I could just remove it entirely but I'd rather keep it on for the other sites.
I realize you can use the SecRuleRemoveByID directive, based on each rule's ID, but as you can see above, this has no ID, it's just a string.
How do I disable that rule for just www.example.com, is there something I can do in custom.conf, whitelist.conf or exclude.conf ?