40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
LoadFile /usr/local/lib/libxml2.so
|
|
LoadModule security2_module /usr/lib/apache/mod_security2.so
|
|
<IfModule mod_security2.c>
|
|
# Default recommended configuration
|
|
SecRuleEngine On
|
|
SecRequestBodyAccess On
|
|
SecDefaultAction "phase:2,deny,log,status:406"
|
|
SecRequestBodyLimitAction ProcessPartial
|
|
SecResponseBodyLimitAction ProcessPartial
|
|
SecRequestBodyLimit 13107200
|
|
SecRequestBodyNoFilesLimit 131072
|
|
SecAuditLogFormat JSON
|
|
|
|
SecPcreMatchLimit 250000
|
|
SecPcreMatchLimitRecursion 250000
|
|
|
|
SecCollectionTimeout 600
|
|
|
|
SecDebugLog /var/log/httpd/modsec_debug.log
|
|
SecDebugLogLevel 0
|
|
SecAuditEngine RelevantOnly
|
|
|
|
<IfModule mod_ruid2.c>
|
|
SecAuditLogDirMode 1733
|
|
SecAuditLogFileMode 0550
|
|
SecAuditLogType Concurrent
|
|
SecAuditLogStorageDir /var/log/modsec_audit
|
|
</IfModule>
|
|
SecAuditLog /var/log/httpd/modsec_audit.log
|
|
SecUploadDir /tmp
|
|
SecTmpDir /tmp
|
|
SecDataDir /tmp
|
|
SecTmpSaveUploadedFiles on
|
|
|
|
# ModSecurity Core Rules Set and Local configuration
|
|
IncludeOptional /etc/modsecurity.d/*.conf.main
|
|
IncludeOptional /etc/modsecurity.d/*.conf
|
|
IncludeOptional /usr/local/directadmin/data/admin/modsecurity_rules
|
|
</IfModule>
|