修改awastats的配置文件
[root@localhost tools]# mkdir /var/lib/awstats
[root@localhost tools]# vi /etc/awstats/awstats.www.xxx.com.conf
[root@localhost tools]# cat /etc/awstats/awstats.www.xxx.com.conf | grep -vnE ^# |less
51:LogFile="/var/log/ppp/access.log"
63:LogType=W
122:LogFormat=1
134:LogSeparator=" "
153:SiteDomain="www.xxx.com"
168:HostAliases="kissing.com www.xxx.com 127.0.0.1 localhost"
188:DNSLookup=2
203:DirData="/var/lib/awstats"
开始分析命令
[root@localhost tools]# /usr/local/awstats/wwwroot/cgi-bin/awstats.
pl --update -config=www.xxx.com
Create/Update database for config "/etc/awstats/awstats.www.kissing.com.conf" by AWStats version 7.0 (build 1.971)
From data in log file "/var/log/ppp/access.log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Jumped lines in file: 0
Parsed lines in file: 1759345
Found 6 dropped records,
Found 0 comments,
Found 0 blank records,
Found 20 corrupted records,
Found 0 old records,
Found 1759319 new qualified records.
访问分析页面
本地
http://localhost/awstats/awstats.pl?config=www.XXX.com
非本地访问
http://192.168.254.46/awstats/awstats.pl?config=www.XXX.com


