-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
chaining rules not working in modsecurity 3.0 #1877
Comments
@Goron1606, can you try placing all directives inside the same directive to see if it makes any difference? Also, try placing chained rules inside the same configuration file (e.g. include.conf) and then loading it with |
@victorhora thank you. Placing them in same directive works with 2.x syntax.. But, Any explanation for why the above syntax doesn't work? |
How do I write chain rules as below in example.conf file itself?
This gives error as below.
The same rule works if I place them in separate directive using 2.x syntax.
Let me know what to do. |
Try
|
@void-in I get syntax error for your variation.
If I modify slightly like below
Error: |
I just tried the following (note the trailing semicolon) and nginx is not complaining:
|
@void-in Still I face the same Errors. Am using
|
@Goron1606 I believe there's something wrong with your syntax. If I write your rule using the correct syntax for the modsecurity_rules directive in libModSecurity:
This loads fine on the latest version of libModSecurity. See https://github.com/SpiderLabs/ModSecurity-nginx/blob/master/README.md, section modsecurity_rules for a syntax reference. If you still face issues with the rule above, it might be something specifically related with Apache. Being so, please fill an issue at https://github.com/SpiderLabs/ModSecurity-apache. Thanks. |
@victorhora . I have tried this earlier. Again I am facing the same syntax error messages. I have raised an issue here. Thanks. |
Recently I configured mod-security v3/master and Below is my sample.com.conf file.
The chain rule above is not working.
Let me know what is wrong in it.
The text was updated successfully, but these errors were encountered: