Results tagged “awstats”

只好自己增加handler了:

[xxx/awstats/cgi-bin]
$ cat .htaccess
AddHandler cgi-script   .cgi   .pl  

--EOF--

$ cat getlog.sh

 

#!/bin/sh
cd /home/yimutian/logs
datestr=`date +%Y%m%d -d '1 days ago'`
filename="www.guduo.net."$datestr
Year=`date +%Y -d '0 days ago'`
Month=`date +%b -d '0 days ago'`
logfile="guduo.yimutian.net-"$Month"-"$Year".gz"
echo $logfile
/bin/gzip -dc $logfile > /home/yimutian/apache_logs/$filename

 

放入crontab,在fastdomain增量打包每天的日志后自己再备份一个给awstats用。

--EOF--

对guduo.net进行了一些配置升级

MT增加一个widget LinkList,由于增加一些自己常用的链接的入口;

修改了awstats的配置,打开了一些plugins:

Created by awstats (plugins: hostinfo, qqhostinfo, geoip_city_maxmind, hashfiles, geoip, decodeutfkeys, tooltips)

其中qqhostinfo最为恼火,参考了网上一些资料,因为自己的awstats完全按照

http://wiki.dreamhost.com中的教程进行安装,修改qqwry.pl时指定QQWry.Dat的时候总是有问题,测试了几次才搞定:

awstats/cgi-bin/plugins/

QQWry.Dat

qqwry.pl

qqhostinfo.pm

可以的配置有三种:

my $ipfile="${DIR}/plugins/QQWry.Dat";
#my $ipfile="./plugins/QQWry.Dat";
#my $ipfile="/home/xxxx/awstats/cgi-bin/plugins/QQWry.Dat";

 

--EOF--

在DreamHost上部署了awstats

静态页面统计访问地址:

http://www.guduo.net/statistics/  (awstats静态统计)

 

动态页面访问地址:

http://www.guduo.net/awstats/cgi-bin/awstats.pl?config=guduo.net

(awstats实时更新)

 

顺便也修改了DH给的默认的ssh账户中的crontab的编辑器:

$ cat ~/.bash_profile

export EDITOR=vi

 

之前修改的set -o vi 即 vi 命令行模式:


$ cat ~/.inputrc
set editing-mode vi

 

htaccess测试:

$ cat .htaccess
AuthName "user/pw:awstats/awstats"
AuthType Basic
AuthUserFile /home/xxx/.htpasswd
Require valid-user

 

htpasswd -c /home/xxx/.htpasswd awstats

 

$ cat awstats.guduo.net.conf | grep ^LogFile
LogFile="/home/www/guduo.net/awstats/tools/logresolvemerge.pl 

/home/www/logs/guduo.net/http/access.log*|"

 

$ crontab -l
0 3 * * * /usr/local/bin/perl /home/xxx/awstats/tools/awstats_buildstaticpages.pl -config=guduo.net -update -awstatsprog=/home/xxx/awstats/cgi-bin/awstats.pl -dir=/home/xxx/guduo.net/statistics/ >/dev/null 2>&1

18 * * * * /home/xxx/guduo.net/awstats/cgi-bin/awstats.pl -config=guduo.net -update >/dev/null

 

 

--EOF--

1

Pages

March 2025

Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31