diff --git a/Dockerfile b/Dockerfile index 41168d51..ea3393d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ FROM ubuntu:18.04 # https://nginx.org/en/linux_packages.html#Ubuntu # RUN apt-get update && \ - apt -y install curl gnupg2 ca-certificates lsb-release git less && \ + apt -y install curl gnupg2 ca-certificates lsb-release git less libyajl-dev && \ echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \ | tee /etc/apt/sources.list.d/nginx.list && \ echo "deb http://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx" \ @@ -18,7 +18,8 @@ RUN apt-get update && \ apt-get install -y dnsutils git wget build-essential libpcre3 libpcre3-dev libssl-dev libtool autoconf apache2-dev libxml2-dev libcurl4-openssl-dev automake pkgconf vim && \ apt clean && \ ln -sf /dev/stdout /var/log/nginx/access.log && \ - ln -sf /dev/stderr /var/log/nginx/error.log + ln -sf /dev/stderr /var/log/nginx/error.log && \ + ln -sf /dev/stdout /var/log/modsec_audit.log # # Put compiled module source under /usr/src diff --git a/test/modsec/modsecurity.conf b/test/modsec/modsecurity.conf index 0e3d59e1..cf8f25b9 100644 --- a/test/modsec/modsecurity.conf +++ b/test/modsec/modsecurity.conf @@ -229,6 +229,10 @@ SecAuditLogParts ABIJDEFHZ # SecAuditLogType Serial SecAuditLog /var/log/modsec_audit.log +SecAuditLogFormat JSON +#SecAuditLogDirMode 0777 +#SecAuditLogType concurrent +#SecAuditLogStorageDir /var/log/modsecurity # Specify the path for concurrent audit logging. #SecAuditLogStorageDir /opt/modsecurity/var/audit/ diff --git a/test/runTest.sh b/test/runTest.sh index bf12ccd5..99529437 100644 --- a/test/runTest.sh +++ b/test/runTest.sh @@ -17,4 +17,4 @@ sleep 10 curl -D - http://localhost:9085/ curl -D - http://localhost:9080/ curl -D - http://localhost:9080/foo?testparam=thisisatestofmodsecurity - +docker logs nginx-test