Prilagodba za Debian lenny, paket verzije 2.5.11-1~cn1.
[libapache-mod-security.git] / modsecurity.conf-minimal
1
2 # Basic configuration options
3 SecRuleEngine On
4 SecRequestBodyAccess On
5 SecResponseBodyAccess Off
6
7 # Handling of file uploads
8 # TODO Choose a folder private to Apache.
9 # SecUploadDir /opt/apache-frontend/tmp/
10 SecUploadKeepFiles Off
11
12 # Debug log
13 SecDebugLog logs/modsec_debug.log
14 SecDebugLogLevel 0
15
16 # Serial audit log
17 SecAuditEngine RelevantOnly
18 SecAuditLogRelevantStatus ^5
19 SecAuditLogParts ABIFHZ
20 SecAuditLogType Serial
21 SecAuditLog logs/modsec_audit.log
22
23 # Maximum request body size we will
24 # accept for buffering
25 SecRequestBodyLimit 131072
26
27 # Store up to 128 KB in memory
28 SecRequestBodyInMemoryLimit 131072
29
30 # Buffer response bodies of up to
31 # 512 KB in length
32 SecResponseBodyLimit 524288
33
34 # Verify that we've correctly processed the request body.
35 # As a rule of thumb, when failing to process a request body
36 # you should reject the request (when deployed in blocking mode)
37 # or log a high-severity alert (when deployed in detection-only mode).
38 SecRule REQBODY_PROCESSOR_ERROR "!@eq 0" \
39 "phase:2,t:none,log,deny,msg:'Failed to parse request body.',severity:2"
40
41 # By default be strict with what we accept in the multipart/form-data
42 # request body. If the rule below proves to be too strict for your
43 # environment consider changing it to detection-only. You are encouraged
44 # _not_ to remove it altogether.
45 SecRule MULTIPART_STRICT_ERROR "!@eq 0" \
46 "phase:2,t:none,log,deny,msg:'Multipart request body \
47 failed strict validation: \
48 PE %{REQBODY_PROCESSOR_ERROR}, \
49 BQ %{MULTIPART_BOUNDARY_QUOTED}, \
50 BW %{MULTIPART_BOUNDARY_WHITESPACE}, \
51 DB %{MULTIPART_DATA_BEFORE}, \
52 DA %{MULTIPART_DATA_AFTER}, \
53 HF %{MULTIPART_HEADER_FOLDING}, \
54 LF %{MULTIPART_LF_LINE}, \
55 SM %{MULTIPART_SEMICOLON_MISSING}, \
56 IQ %{MULTIPART_INVALID_QUOTING}'"
57
58 # Did we see anything that might be a boundary?
59 SecRule MULTIPART_UNMATCHED_BOUNDARY "!@eq 0" \
60 "phase:2,t:none,log,deny,msg:'Multipart parser detected a possible unmatched boundary.'"