modsecurity系列二:主文件配置

本文深入探讨了ModSecurity的主要配置指令及其作用,包括参数分隔符、Cookie格式设置、持久存储文件夹设置等,并详细解释了如何通过日志开关来控制交易日志的记录,提供了一个关于交易相关错误和警告的日志记录策略。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Main configuration directives

主要的有如下几个:

SecArgumentSeparator Sets the application/x-www-form-urlencoded parameter separator
SecCookieFormat Sets the cookie parser version
SecDataDir Sets the folder for persistent storage
SecRequestBodyAccess Controls request body buffering
SecRequestBodyInMemoryLimit Sets the size of the per-request memory buffer
SecRequestBodyLimit Sets the maximum request body size ModSecurity will accept
SecRequestBodyNoFilesLimit Sets the maximum request body size, excluding uploaded files
SecResponseBodyAccess Controls response body buffering
SecResponseBodyLimit Specifies the response body buffering limit
SecResponseBodyLimitAction Controls what happens once the response body limit is reached
SecResponseBodyMimeType Specifies a list of response body MIME types to inspect
SecResponseBodyMimeTypesClear Clears the list of response body MIME types
SecRuleEngine Controls the operation of the rule engine

SecTmpDir Sets the folder for temporary files


日志开关:

Our default configuration will use audit logging only for the transactions that are relevant,which means those that have had an error or a warning reported against them. Other possiblevalues for SecAuditEngine are On (log everything) and Off (log nothing).
# Log only what is really necessary.
SecAuditEngine RelevantOnly






评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值