I don't want to change the config at vhost level. I just want to restrict a rule to a certain vhost.
I tried this in modsec2.user.conf but it doesn't trigger (it doesn't log anything):
SecAuditLogParts "ABCFHZ"
...
<VirtualHost domain.com>
SecRule REQUEST_METHOD "POST" "id:22222224,phase:2,ctl:auditEngine=On,log,auditlog,pass"
</VirtualHost>
If I remove <VirtualHost> tag/endtag it works as expected.
What am I doing wrong?