Closed cyberblackhole closed 5 years ago
Instead of using multiple _modsecurityrules we recommend you to use a single one. Or to include an external file.
Hi @Goron ,
I faced same issue in ModSecurity-apache with libmodsecurity and followed above two solutions given by @zimmerle but couldn't solve my issue. Then I tried multiple attempts like putting chain in front or put chain in last or put rule in single line. After all that effort I got success in putting both rule in one line like below and worked for me.
modsecurity_rules 'SecRule ARGS "anyargument" "pass,log,id:123,chain"SecRule REQUEST_URI "index.php"'
Could you try same and and check if its working for you. Waiting for your reply.
Have you tried:
modsecurity_rules '
SecRule ARGS "anyargument" "pass,log,id:123,chain"
SecRule REQUEST_URI "index.php"
'
?
It's been a long time. I will try this out next time and get back. Thanks for the update @zimmerle
I've tried same and its giving me below error as previously,
modsecurity_rules takes one argument, Please ensure that the arugment is specified correctly, including line continuations.
Only below is working for me,
modsecurity_rules 'SecRule ARGS "anyargument" "pass,log,id:123,chain"SecRule REQUEST_URI "index.php"'
Lets see what @Goron says.
Hi,
I have raised an issue here describing chain rules syntax. I'm posting it here as suggested by @victorhora .
Kindly let me know what is wrong.