-
Notifications
You must be signed in to change notification settings - Fork 1.6k
ModSecurity: SecPcreMatchLimit not allowed in VirtualHost #1481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @itbuiductai, Yes, indeed there are a few directives that aren't allowed to be placed inside VirtualHost configurations, namely: You should place these inside your global server-wide (not per VirtualHost) configuration. Normally this will be placed inside your modsecurity.conf configuration file. |
I've added notes on the reference manual to make this limitation clearer: https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual#SecPcreMatchLimit |
Hi @victorhora |
You should be able to safely set different VirtualHosts just fine with your ModSecurity configuration. As long as your "template" don't use any of the directives mentioned above inside your VirtualHost context and just have this one directive set globally. You might have a legitimate reason for needing to set different SecPcreMatchLimit values for different web applications, but you should be able to get away with it by just setting the value globally. You can learn about SecPcreMatchLimit on the reference manual: https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual#SecPcreMatchLimit |
Thanks @victorhora , |
I try to configure modsecurity with a virtual host in apache then it alerted the error: "ModSecurity: SecPcreMatchLimit not allowed in VirtualHost". Why SecPcreMatchLimit was not allowed in Virtual host? any option of mod_sec is same that.
The text was updated successfully, but these errors were encountered: