Skip to content

Commit

Permalink
Merge pull request #2 from uc-cdis/fix/json-logs
Browse files Browse the repository at this point in the history
fix(json-logs): add yajl-dev to build
  • Loading branch information
frickjack authored Jan 22, 2020
2 parents 5ee81a4 + 488d722 commit d99daa1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand All @@ -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
Expand Down
4 changes: 4 additions & 0 deletions test/modsec/modsecurity.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion test/runTest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d99daa1

Please sign in to comment.