日期:2014-05-17  浏览次数:20941 次

Windows下AWstats安装教程

AWStats是一个免费、功能强大、特性丰富的日志分析工具,它能分析由WEB、STREAMING、FTP、MAIL等服务生成的日志,并生成先进的统计图表。AWStats作为CGI或从命令行运行,在数个图形网页中显示你日志中包含的所有可能信息。它利用一部分档案资料就能经常很快地处理大量日志档案。它能分析的日志文件来自从各大服务器工具,如 Apache、nginx日志文件 (NCSA combined/XLF/ELF log format or common/CLF log format)、WebStar、IIS (W3C日志格式)及许多其他Web、Proxy(代理服务器)、Wap、流服务器、邮件服务器和一些FTP服务器。

?

1. WEB服务器(iis,apache,nginx)日志分析演示界面

http://awstats.sourceforge.net/cgi-bin/awstats.pl

2. FTP服务器的日志分析演示界面

http://awstats.sourceforge.net/awstats.ftp.html

3. 邮件服务器的日志分析演示界面

http://awstats.sourceforge.net/awstats.mail.html

一、下载awstats

目前最新版本为awstats 7.0

http://awstats.sourceforge.net/#download

二、安装

双击下载的awstats-7.0.exe文件,选择安装目录,我的安装目录为d:/awstats,这里要注意最好不要安装到系统盘,因为需要的日志文件可能很大,这样可能会很快的吞噬掉系统盘的空间。

当选择完安装目录后,会弹出一个命令行窗口,要求填入apache的安装目录,我的apache安装目录是C:\Program Files\Apache Software Foundation\Apache2.2:

Apache Web server path ('none' to skip):
>C:\Program Files\Apache Software Foundation\Apache2.2

然后填写apache的配置文件路径(我的配置文件路径为C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf):

Now, enter full config file path of your Web server.
Example: /etc/httpd/httpd.conf
Example: /usr/local/apache2/conf/httpd.conf
Example: c:\Program files\apache group\apache\conf\httpd.conf
Config file path ('none' to skip web server setup):
>C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf

提示是否需要创建配置文件,填入y:

-----> Need to create a new config file ?
Do you want me to build a new AWStats config/profile
file (required if first install) [y/N] ?y

创建配置文件名称(这里输入配置的名称,我这里定的名称为firstaws):

-----> Define config file name to create
What is the name of your web site or profile analysis ?
Example: www.mysite.com
Example: demo
Your web site, virtual server or profile name:
>firstaws

然后连续两次都是回车,awstats的安装就完成了。这个时候Awstats已经在我们的apache配置文件中自动添加了一些配置,因为我们在这里需要重启一下apache。

重启完Apache后我们就可以在浏览器中输入以下地址访问到awstats的Web界面了:

http://localhost/awstats/awstats.pl?config=firstaws

config参数的值就是上面配置的配置文件的名称。

三、配置awstats

1、打开awstas安装目录下的wwwroot/cgi-bin/目录,在里面复制一个awstats.model.conf文件并重命名为aws