echo ""; echo ""; echo ""; echo ""; if(!is_admin){echo "";} » 使用cronolog分割apache日志,使用awstats分析按日期生成的apache日志 仲子说

2007-04-30

使用cronolog分割apache日志,使用awstats分析按日期生成的apache日志

Posted in Apache at 14:54 Author:仲远

标签:

????????????apache???????????????apache????????????????????????????????????????????????????apache????????????????awstats??????????????????????????????????????????????????????apahce????????????apache???????cronolog?????????cronolog??????

????cronolog?????????????????????????????freebsd??????ports???????

?????????apache?????httpd.conf???????????????????
CustomLog /home/XXX/logs/www.wangzhongyuan.com-access.log combined
???
CustomLog “|/usr/local/sbin/cronolog /home/XXX/logs/www.wangzhongyuan.com-access.log.%Y%m” combined
??CustomLog??????:)????
???/home/XXX/logs ????log??????/usr/local/sbin/cronolog?cronolog?????????? which cronolog ???????%Y%m?????????????????????????????????????????????%Y%m%d

??????apache?????apache???????????????apache??????????????????

????????awstats??????????????apache??????????????awstats???????
?awstats??????LogFile???????
LogFile=”/home/XXX/logs/www.wangzhongyuan.com-access.log”
??
LogFile=”/home/XXX/logs/www.wangzhongyuan.com-access.log.%YYYY-24%MM-24″
????????????.%YYYY-24%MM-24??????????????????????%YYYY-24 ??24????????%MM-24??24???????????%YYYY-24%MM-24???24???????????????24???????????awstats??apache??????????????????????????cron???update??????????2007?5?1???1????????apahce??????????????????2007?4?30????????cron?????5?1??????????????????????????????apche?????????????????24?????????????????????

本文可以自由转载,转载时请保留全文并注明出处:
转载自仲子说 [ http://www.wangzhongyuan.com/ ]
原文链接:

2 Comments »

  1. jsdfmsd said,

    2008年September1日 at 12:24

    为什么我在Rhel5下配置Apache httpd.conf CustomLog “。。。。/log.%YYYY-24%MM-24%DD-24.log”重新启动Apache后,生成的日志文家名为:og.%YYYY-24%MM-24%DD-24.log 其中的日期解析不了。
    PS:Apache Perl 都是系统自带的

  2. 仲远 said,

    2008年September1日 at 14:16

    你在apache的httpd.conf的配置文件中写错了。你仔细看一下我的文章,应该是写第二条蓝色语句才是httpd.conf要做的修改:

    /home/XXX/logs/www.wangzhongyuan.com-access.log.%Y%m

    而”log.%YYYY-24%MM-24%DD-24″这个是awstats的配置文件需要做的修改。

Leave a Comment

*
To prove you're a person (not a spam script), type the security text shown in the picture. Click here to regenerate some new text.
Click to hear an audio file of the anti-spam word