[QUESTION] lua m.log(2, "4444") where is the log message?
docker run --privileged --rm -ti owasp/modsecurity-crs:3.3.5-nginx-alpine-202401080101
/etc/modsecurity.d # grep SecRule setup.conf
SecRuleScript "/tmp/2.lua" "id:23333,deny"
/etc/modsecurity.d/owasp-crs # cat /tmp/2.lua
function main()
--error("4444")
--print("4444")
m.log(1,"4444")
m.log(2,"4444")
return nil;
end
I am sure lua script have been exectued, but i checked "console output"、"nginx error log", and can not found the log message "4444".
So where is the log message?
I had the same experience. With httpd the log message appeared in the error log, as expected, with nginx, it was nowhere to be found.
Technically, this is not an issue of the images but of ModSecurity, unless Lua logging works with a standard installation. Do you know, @leveryd?
@azurit do you have some experience with this problem?
@leveryd Try adding this line before m.log:
pcall(require, "m")
@leveryd Try adding this line before
m.log:pcall(require, "m")
It still behave the same, i can not find the log message.