日志级别已启用,仍然可以';在Apache服务器上看不到POST数据
我真的很喜欢日志级别已启用,仍然可以';在Apache服务器上看不到POST数据,apache,Apache,我真的很喜欢取证模块的格式,但我知道我可能无法使用mod_dumpio获得相同级别的格式。然而,我遇到的问题是,我启用了所有选项以记录尽可能多的数据,但我仍然无法在任何日志中的任何位置看到POST数据 以下是我的虚拟主机的外观: <VirtualHost *:80> DocumentRoot /var/www/html/ ServerName www.random.com ServerAlias random.com <Directory /v
取证模块的格式
,但我知道我可能无法使用mod_dumpio获得相同级别的格式。
然而,我遇到的问题是,我启用了所有选项以记录尽可能多的数据,但我仍然无法在任何日志中的任何位置看到POST数据
以下是我的虚拟主机的外观:
<VirtualHost *:80>
DocumentRoot /var/www/html/
ServerName www.random.com
ServerAlias random.com
<Directory /var/www/html>
AllowOverride All
Options -MultiViews
Require all granted
</Directory>
<IfModule log_forensic_module>
ForensicLog /var/www/html/forensic.log
</IfModule>
<IfModule dumpio_module>
DumpIOInput On
DumpIOOutput On
LogLevel trace7
</IfModule>
ErrorLog /var/www/html/error.log
CustomLog /var/www/html/access.log combined
</VirtualHost>
DocumentRoot/var/www/html/
服务器名www.random.com
ServerAlias random.com
允许超越所有
选项-多视图
要求所有授权
ForensicClog/var/www/html/forensic.log
dumpioon输入
dumpioon输出
日志级别跟踪7
ErrorLog/var/www/html/error.log
CustomLog/var/www/html/access.log
虽然我可以看到我的网站(我有一个www.random.com的本地主机条目),但我甚至可以发布到论坛上。在日志文件中,我可以看到referer头和其他HTTP头,但是我没有从POST参数中看到任何东西
我已经向web proxy确认POST数据确实正在提交,但我仍然不知道为什么它没有显示在任何日志文件中
我做错了什么?我也尝试了
logleveldebug
,但没有任何结果。看起来其他帖子也认为这不起作用,所以我选择了一个确实有效的替代方案:
<IfModule security2_module>
# Enable the module.
SecRuleEngine On
SecAuditEngine on
# Setup logging in a dedicated file.
SecAuditLog /path/to/directory/website-audit.log
# Allow it to access requests body.
SecRequestBodyAccess on
SecAuditLogParts ABIFHZ
# Setup default action.
SecDefaultAction "nolog,noauditlog,allow,phase:2"
# Define the rule that will log the content of POST requests.
SecRule REQUEST_METHOD "^POST$" "chain,allow,phase:2,id:123"
SecRule REQUEST_URI ".*" "auditlog"
</IfModule>
#启用该模块。
SecRuleEngine打开
启动发动机
#在专用文件中设置日志记录。
SecAuditLog/path/to/directory/website-audit.log
#允许它访问请求正文。
SecRequestBodyAccess on
SecAuditLogParts ABIFHZ
#设置默认操作。
SecDefaultAction“nolog,noauditlog,allow,phase:2”
#定义将记录POST请求内容的规则。
SecRule请求\方法“^POST$”链,允许,阶段:2,id:123”
SecRule请求\u URI“*”审核日志