Skip to content

Instantly share code, notes, and snippets.

@p0pr0ck5
Created February 18, 2016 23:09
Show Gist options
  • Save p0pr0ck5/3864f5f18ae5ba5cb7aa to your computer and use it in GitHub Desktop.
Save p0pr0ck5/3864f5f18ae5ba5cb7aa to your computer and use it in GitHub Desktop.
modsecurity on;
modsecurity_rules '
SecDefaultAction "phase:2,deny,auditlog,status:403"
SecRuleEngine On
SecDebugLog /tmp/modsec_debug.log
SecDebugLogLevel 9
SecAuditLog /tmp/modsec_audit.log
SecAuditLogRelevantStatus "403"
SecAuditLogParts ABCFHKZ
SecAuditEngine RelevantOnly
SecAuditLogType Serial
SecResponseBodyAccess On
SecRule RESPONSE_BODY "@contains nginx" "id:1,phase:4,deny"
';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment