是否有可能调整Apacheconfiguration以某种方式loggingPOST / GET参数?
例如,这是它当前logging的内容:
174.131.xx.xxx - - [30/Apr/2013:08:41:59 -0500] "POST /admin/bl_orderItem.php HTTP/1.1" 200 44
我想在日志中看到像这样的东西:
174.131.xx.xxx - - [30/Apr/2013:08:41:59 -0500] "POST /admin/bl_orderItem.php?name=John&lastName=Rambo&zip=12331 HTTP/1.1" 200 44
谢谢你的所有build议。
在自定义日志格式中,%r(请求的第一行)将包含GET参数。 对于GET参数,使用%q(查询string(如果存在查询string,则前缀为?,否则为空string))。
请参阅http://httpd.apache.org/docs/2.4/mod/mod_log_config.html#formats
对于发布数据,你必须使用mod_dumpio。
你也可能想看看mod_security模块来做到这一点。 logging所有参数(进出)非常棒。
你可以使用php:
https://stackoverflow.com/questions/3718307/php-script-to-log-the-raw-data-of-post
<?php file_put_contents("post.log",print_r($_POST,true)); ?>