1 ### Test for SecRuleScript
6 comment => "SecRuleScript (lua absolute nomatch)",
9 SecDebugLog $ENV{DEBUG_LOG}
11 SecRuleScript "$ENV{CONF_DIR}/test.lua" "phase:2,deny"
14 -error => [ qr/Lua script matched\./, 1 ],
15 debug => [ qr/Test message\./, 1 ],
20 request => new HTTP::Request(
21 GET => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
26 comment => "SecRuleScript (lua relative nomatch)",
29 SecDebugLog $ENV{DEBUG_LOG}
31 SecRuleScript "test.lua" "phase:2,deny"
34 -error => [ qr/Lua script matched\./, 1 ],
35 debug => [ qr/Test message\./, 1 ],
40 request => new HTTP::Request(
41 GET => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
46 comment => "SecRuleScript (lua relative match)",
49 SecDebugLog $ENV{DEBUG_LOG}
51 SecRuleScript "match.lua" "phase:2,deny"
54 error => [ qr/ModSecurity: Access denied with code 403 \(phase 2\)\. Lua script matched\./, 1 ],
55 debug => [ qr/Test message\./, 1 ],
60 request => new HTTP::Request(
61 GET => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",