Skip to content

Commit 22322ce

Browse files
committed
Update modsecurity.conf file for IIS build
1 parent 9be0a40 commit 22322ce

File tree

2 files changed

+107
-12
lines changed

2 files changed

+107
-12
lines changed

iis/wix/modsecurity.conf

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ SecRequestBodyAccess On
2020
# Enable XML request body parser.
2121
# Initiate XML Processor in case of xml content-type
2222
#
23-
SecRule REQUEST_HEADERS:Content-Type "text/xml" \
23+
SecRule REQUEST_HEADERS:Content-Type "(?:application(?:/soap\+|/)|text/)xml" \
2424
"id:'200000',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=XML"
2525

2626
# Enable JSON request body parser.
@@ -40,7 +40,7 @@ SecRequestBodyLimit 13107200
4040
SecRequestBodyNoFilesLimit 131072
4141

4242
# Store up to 128 KB of request body data in memory. When the multipart
43-
# parser reachers this limit, it will start using your hard disk for
43+
# parser reaches this limit, it will start using your hard disk for
4444
# storage. That is slow, but unavoidable.
4545
#
4646
SecRequestBodyInMemoryLimit 131072
@@ -110,7 +110,7 @@ SecRule TX:/^MSC_/ "!@streq 0" \
110110
# Do keep in mind that enabling this directive does increases both
111111
# memory consumption and response latency.
112112
#
113-
#SecResponseBodyAccess On
113+
SecResponseBodyAccess On
114114

115115
# Which response MIME types do you want to inspect? You should adjust the
116116
# configuration below to catch documents but avoid static files
@@ -151,7 +151,7 @@ SecDataDir c:\inetpub\temp\
151151
# location must be private to ModSecurity. You don't want other users on
152152
# the server to access the files, do you?
153153
#
154-
#SecUploadDir /opt/modsecurity/var/upload/
154+
#SecUploadDir c:\inetpub\temp\
155155

156156
# By default, only keep the files that were determined to be unusual
157157
# in some way (by an external inspection script). For this to work you
@@ -171,7 +171,7 @@ SecDataDir c:\inetpub\temp\
171171
# The default debug log configuration is to duplicate the error, warning
172172
# and notice messages from the error log.
173173
#
174-
#SecDebugLog /opt/modsecurity/var/log/debug.log
174+
#SecDebugLog c:\inetpub\temp\debug.log
175175
#SecDebugLogLevel 3
176176

177177

@@ -181,17 +181,17 @@ SecDataDir c:\inetpub\temp\
181181
# trigger a server error (determined by a 5xx or 4xx, excluding 404,
182182
# level response status codes).
183183
#
184-
#SecAuditEngine RelevantOnly
185-
#SecAuditLogRelevantStatus "^(?:5|4(?!04))"
184+
SecAuditEngine RelevantOnly
185+
SecAuditLogRelevantStatus "^(?:5|4(?!04))"
186186

187187
# Log everything we know about a transaction.
188-
#SecAuditLogParts ABIJDEFHZ
188+
SecAuditLogParts ABIJDEFHZ
189189

190190
# Use a single file for logging. This is much easier to look at, but
191191
# assumes that you will use the audit log only ocassionally.
192192
#
193-
#SecAuditLogType Serial
194-
#SecAuditLog c:\inetpub\log\modsec_audit.log
193+
SecAuditLogType Serial
194+
SecAuditLog c:\inetpub\log\modsec_audit.log
195195

196196
# Specify the path for concurrent audit logging.
197197
#SecAuditLogStorageDir c:\inetpub\log\
@@ -216,8 +216,7 @@ SecCookieFormat 0
216216
# to properly map encoded data to your language. Properly setting
217217
# these directives helps to reduce false positives and negatives.
218218
#
219-
#SecUnicodeCodePage 20127
220-
#SecUnicodeMapFile unicode.mappinga
219+
SecUnicodeMapFile unicode.mapping 20127
221220

222221
# Improve the quality of ModSecurity by sharing information about your
223222
# current ModSecurity version and dependencies versions.

0 commit comments

Comments
 (0)