Skip to content

Instantly share code, notes, and snippets.

@zimmerle
Created November 14, 2017 17:53
Show Gist options
  • Select an option

  • Save zimmerle/a5574df6a76e8b5a7d625c36225dc9b4 to your computer and use it in GitHub Desktop.

Select an option

Save zimmerle/a5574df6a76e8b5a7d625c36225dc9b4 to your computer and use it in GitHub Desktop.
Nginx configuration example #2
http {
server {
listen 80;
server_name localhost;
error_page 404 /40x.html;
location = /40x.html {
root /srv/http;
internal;
}
location / {
root html;
index index.html index.htm;
modsecurity on;
modsecurity_rules '
SecRuleEngine On
SecAuditEngine On
SecAuditLogParts ABIJDEFHZ
SecAuditLogType Serial
SecAuditLog /usr/local/nginx/logs/modsec_audit.log
SecDebugLog "/tmp/debug_log.txt"
SecDebugLogLevel 9
SecRule ARGS "test" "log,id:1,block,deny,status:505"
';
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment