apache日志配置不起作用


apache log configurations not working

各位apache专家,

我在远程服务器中编辑apache日志文件时遇到了一些问题,我想随着时间的推移,在我的站点中重新定向的次数。

目前httpd.conf文件看起来像这个

LogFormat "%q" count
SetEnvIf Request_URI "^/cd?$" dolog
CustomLog "|sudo -u daemon /usr/local/zend/apache2/bin/rotatelogs /var/log/survey/count.log 
3600" impression env=dolog

下面是日志文件在重定向后的外观,因为它采用了重定向url的一些参数(dev.mysite.com/cd?id=121212&track=130&go=http://www.google.com)

?id=121212&track=130&go=http://www.google.com

我的问题是我需要得到这个重定向的时间,所以我对httpd.conf文件做了如下修改,以在日志文件中得到时间

LogFormat "%q %t" count
SetEnvIf Request_URI "^/cd?$" dolog
CustomLog "|sudo -u daemon /usr/local/zend/apache2/bin/rotatelogs /var/log/survey/count.log 
3600" impression env=dolog

但这并没有什么不同。。。因此,请任何人帮助将"时间"写入日志文件。。。

您定义了名为"count"的LogFormat,但在CustomLog指令中使用的是名为"impression"的LogFormat。这些字符串必须匹配,否则更改显然不会出现。