Closed
Description
hi
I'm using libmodsecurity-3.0.0 + modsecurity-nginx-0.0.1 + nginx-1.12.0. I could not find message in the log file even if rule has been triggered.
and here is my nginx configuration
location / {
modsecurity on;
modsecurity_rules_file /etc/nginx/modsecurity/modsec_includes.conf;
root /usr/share/nginx/html;
index index.html index.htm;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header REMOTE_ADDR $remote_addr;
proxy_set_header HOST $host;
}
and this is modsec_includes.conf
include modsecurity.conf
include crs-setup.conf
include rules/*.conf
SecRule ARGS "test" "msg:'trigger the rule',id:'44444',log,auditlog,deny" #this is the rule i used to test
and in modsecurity.conf, I define the log and audit log path
SecDebugLogLevel 3
SecDebugLog /var/log/nginx/debug.log
SecAuditEngine RelevantOnly
SecAuditLogRelevantStatus "^(?:5|4(?!04))"
SecAuditLogParts ABIJDEFHZ
SecAuditLogType Serial
SecAuditLog /var/log/modsec_audit.log
Even if the rule(id:44444) is triggered , I cannot find any message in the debug.log or modsec_audit.log
I really don't know why this happened and please correct me if my configuration is wrong.