我刚刚发现,我的Apache 2.2.8只是在几个星期后login了他的access_logstringplesklog
。 通常看起来像这样
www.xxx.yyy.zzz - - [19/Jul/2013:04:37:32 +0600] "GET /infos.html HTTP/1.1" 200 12371 "http://www.yahoo.com/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0"
目前看起来像这样:
plesklog plesklog plesklog plesklog plesklog [...]
我的apache2.conf如下所示:
[...] LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{mod_php_memory_usage}n" combined LogFormat "%h %l %u %t \"%r\" %>s %b %T %{mod_php_memory_usage}n" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent [...]
在kekkis的评论之后,我发现我的VirtualHosts的所有CustomLog [path]
都指定了一个LogFormat名称plesklog
所以我在主apacheconfiguration文件中添加了以下行:
LogFormat "%h %l %u %t \"%r\" %>s %b %T %{mod_php_memory_usage}n" plesklog
现在所有的东西都被logging下来了。