Andy's Blog » awstats, awstats windows, windows awstats, awstats 安装, AWStats windows 安装, awstats windows安装, AWStats 教程, awstats cronolog windows, 安装AWSTATS » Windows下AWstats安装教程

Windows下AWstats安装教程

win32 awstats 安装记 by Emerald 绿色学院 - Green Institute

一. awstats 简介
二. 下载 awstats
三. 安装 awstats
四. 下载和使用 cronolog
五. 设置 apache 的 httpd.conf 配置文件
六. 设置 AWStats
七. 更新 AWStats

/-*-------------------------------------------------------------------------------------*-/

一. awstats 简介

what is awstats

awstats is a free powerful and featureful tool that generates advanced web, streaming, ftp or mail server statistics, graphically. this log analyzer works as a cgi or from command line and shows you all possible information your log contains, in few graphical web pages. it uses a partial information file to be able to process large log files, often and quickly. it can analyze log files from all major server tools like apache log files (ncsa combined/xlf/elf log format or common/clf log format), webstar, iis (w3c log format) and a lot of other web, proxy, wap, streaming servers, mail servers and some ftp servers.
take a look at this comparison table for an idea on features and differences between most famous statistics tools (awstats, analog, webalizer,...).
awstats is a free software distributed under the gnu general public license. you can have a look at this license chart to know what you can/can't do.
as awstats works from the command line but also as a cgi, it can work with major web hosting provider which allow perl, cgi and log access.

you can browse awstats demo (real-time feature to update stats from web has been disabled on demos) to see a sample of most important information awstats shows you...

1. demo for web server log files
http://awstats.sourceforge.net/cgi-bin/awstats.pl

2. static demo for ftp log files
http://awstats.sourceforge.net/awstats.ftp.html

3. static demo for mail log files
http://awstats.sourceforge.net/awstats.mail.html

/-*-------------------------------------------------------------------------------------*-/

二. 下载 awstats
http://awstats.sourceforge.net/#download

----------------------------------------------------
注: 既然题目是安装记了, 嘻嘻, 那自然完全按我的方法进行.
----------------------------------------------------

我是下载 awstats-6.4.exe 自安装版本.

/-*-------------------------------------------------------------------------------------*-/

三. 安装 awstats

1. 运行 awstats-6.4.exe

2. 安装目录我设置 为: j:\awstats\

3.
#---------------------------------------------------
do you want me to build a new awstats config/proifle file

options +execcgi
allowoverride none
order allow,deny
allow from all

#---------------------------------------------------

5. 总结 apache httpd.conf 的设置
#---------------------------------------------------
##############################################################
## 避免对图片的请求出现在访问日志中
setenvif request_uri \.gif image-request
setenvif request_uri \.jpg image-request
setenvif request_uri \.png image-request
setenvif request_uri \.jpeg image-request

## 记录使用英语的请求到一个日志,而记录非英语的请求到另一个日志
#setenvif accept-language "en" english

#customlog logs/english_log.log common env=english
#customlog logs/non_english_log.log common env=!english
#customlog logs/access_log.log common env=!image-request

#customlog logs/access_log.log common env=!image-request
#customlog "logs/access_log.%y%m%d" combined env=!image-request
##############################################################

customlog "|bin/cronolog.exe logs/access_%y%m%d.log" combined env=!image-request

########################################################
# awstats
alias /awstatsclasses "j:/awstats/wwwroot/classes/"
alias /awstatscss "j:/awstats/wwwroot/css/"
alias /awstatsicons "j:/awstats/wwwroot/icon/"
scriptalias /awstats/ "j:/awstats/wwwroot/cgi-bin/"

options +execcgi
allowoverride none
order allow,deny
allow from all

########################################################
#---------------------------------------------------

6. 如果设置好的话, 重新启动 apache
#---------------------------------------------------
net stop apache2
net start apache2
#---------------------------------------------------

7. 一切顺利的话, 在 apache 的 log 目录应该有这样格式的日志显示
#---------------------------------------------------
access_20050309.log
#---------------------------------------------------

----------------------------------------------------
注: c:\program files\apache group\apache2\logs
----------------------------------------------------

8. 一切完成的话那就摆平 apache 方面的设置, 接着是 设置 awstats.

/-*-------------------------------------------------------------------------------------*-/

六. 设置 AWStats

1. 进入 J:\awstats\wwwroot\cgi-bin\ 目录

2. 打开 awstats.model.conf, 复制 awstats.model.conf 的内容到 awstats.gi.2288.org.conf 文件.
----------------------------------------------------
注: 我安装后 awstats.gi.2288.org.conf 里是空白的.
----------------------------------------------------

3. 查找 Logfile 字符串, 设置为:
#---------------------------------------------------
LogFile="C:\Program Files\Apache Group\Apache2\logs\access_%YYYY-24%MM-24%DD-24.log"
#---------------------------------------------------

4. 在 awstats.gi.2288.org.conf 文件里按 CTRL+F 查找 SiteDomain 字符串, 添加站点域名, 例:
#---------------------------------------------------
SiteDomain="gi.2288.org:88"
#---------------------------------------------------

5. 查找 HostAliases 字符串, 添加站点根域名, 我没有, 所以就让它成为默认状态.

6. 查找 DirData 字符串, 我的设置:
#---------------------------------------------------
DirData="."
#---------------------------------------------------

7. 查找 LoadPlugin="decodeutfkeys", 去掉前面的 # 字符, 例:
#---------------------------------------------------
#LoadPlugin="decodeutfkeys"
LoadPlugin="decodeutfkeys"
#---------------------------------------------------

8. AWStats 的设置完成大半部分了, 接着该是更新了, 要用到 Perl.
----------------------------------------------------
注: 不需要指定 Include"" 里的包含文件.
----------------------------------------------------

/-*-------------------------------------------------------------------------------------*-/

七. 更新 AWStats

1. 命令行方式 进入 Perl 安装目录的 Bin 目录, 例如我的:
#---------------------------------------------------
C:\Perl\bin>
#---------------------------------------------------

2. 运行下面的命令更新,例:
#---------------------------------------------------
perl J:\awstats\wwwroot\cgi-bin\awstats.pl -update -config=gi.2288.org
#---------------------------------------------------

显示为:
----------------------------------------------------
C:\Perl\bin>perl J:\awstats\wwwroot\cgi-bin\awstats.pl -update -config=gi.2288.
org
Update for config "J:\awstats\wwwroot\cgi-bin/awstats.gi.2288.org.conf"
With data in log file "C:\Program Files\Apache Group\Apache2\logs\access_2005030
8.log"...
Phase 1 : First bypass old records, searching new record...
Direct access after last parsed record (after line 52)
Jumped lines in file: 52
Found 52 already parsed records.
Parsed lines in file: 0
Found 0 dropped records,
Found 0 corrupted records,
Found 0 old records,
Found 0 new qualified records.

C:\Perl\bin>
----------------------------------------------------

3. 这时在 J:\awstats\wwwroot\cgi-bin 下会多了一个 awstats032005.gi.2288.org.txt 的文本文件.

4. 完成了...

/-*-------------------------------------------------------------------------------------*-/

附加: 在 AWStats 目录下有一个 DOC 目录, 里面有参考资料, 慢慢看, 还有很多用处, 我也是熟悉中.

偶的 AWSTATS 地址: http://gi.2288.org:88/awstats/awstats.pl?month=07&year=2005&output=main&config=gi.2288.org&framename=index

/****************************************************************\
*
* author : Emerald
*
* homepage : http://gi.2288.org:88/
*
* Seo-Gi : http://seo.2288.org:99
*
* sitename : 绿色学院 - Green Institute
*
* date : 2005-3-9 23:06:50
*
\****************************************************************/

Incoming search terms:

Tags: awstats, 安装教程, httpd.conf

本文地址: http://blog.21andy.com/20070113/528.html

1 评论 to “PHP开源CMS之MODx”

  1. alex 于 2008-12-05 19:25:32 发表:

    你好,我按照你说的配置apache,可是在logs下看不到类似access_20050309.log
    的文件,只有一个access.log