AWStats For Windows 架设配置
(2008-12-23 17:49)
分类: 网络安全
------------------------------------------------------------
Downloads
------------------------------------------------------------
1. XAMPP For Windows
http://www.apachefriends.org/zh_cn/xampp-windows.html
2. AWSTATS
http://awstats.sourceforge.net/#DOWNLOAD
3. ActivePerl For Windows
http://www.activestate.com/Products/activeperl/index.mhtml
------------------------------------------------------------
Installations
------------------------------------------------------------
1. 安装 XAMPP 到 D:\xampp
2. 安装 Perl 到 C:\perl
3. 安装 Awstats 到 D:\xampp\htdocs\awstats
------------------------------------------------------------
Configuration
------------------------------------------------------------
1. Apache
编辑 D:\xampp\apache\conf\httpd.conf , 在配置文件的底部加入以下内容:
Alias /icon "D:/xampp/htdocs/awstats/wwwroot/icon/"
Alias /awstatsclasses "D:/xampp/htdocs/awstats/wwwroot/classes/"
Alias /awstatscss "D:/xampp/htdocs/awstats/wwwroot/css/"
Alias /awstatsicons "D:/xampp/htdocs/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "D:/xampp/htdocs/awstats/wwwroot/cgi-bin/"
<Directory "D:/xampp/htdocs/awstats/wwwroot">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
2. AWSTATS
编辑 D:\xampp\htdocs\awstats\wwwroot\cgi-bin\awstats.pl
将第一行内容改为 #!c:\perl\bin\perl.exe
复制配置文件D:\xampp\htdocs\awstats\wwwroot\cgi-bin\awstats.model.conf 为 awstats.域名.conf
编辑 awstats.域名.conf , 具体重要参数如下:
Particular attention should be given to these parameters:
- Verify the LogFile
value. It should be the full path of your server log file (You can also use a relative path from your awstats.pl directory, but a full path avoids errors).
- Verify the LogType
value. It should be "W" for analyzing web log files.
- Check if LogFormat is
set to "1" (for "NCSA apache combined/ELF/XLF log format") or use a custom log format if you don't use the combined log format.
- Set the SiteDomain
parameter to the main domain name or the intranet web server name used to reach the web site to analyze (Example: www.mysite.com).
If you have several possible names for same site, use the main domain name and add the others to the list in the HostAlias parameter.
- You can also change other parameters if you want. The full list is described in Configurations/Directives options page.
Installation and configuration is finished. You can jump to the Process logs: Building/updating statistics database section.
* Update from a browser:
AWStats statistics can also be updated from a browser, providing real-time statistics, by clicking the "Update now" link that appears when AWStats is used as a CGI (The URL is described in the next section 'Run reports: Building and reading reports').
Warning!!
To enable this link, the configuration file parameter AllowToUpdateStatsFromBrowser must be set to 1 (The link is not enabled by default).
Using the on-line update does not prevent you from running the update process automatically on a scheduled basis (the command is same as that of the first update process above).
For this, you have two choices:
- Include the update command in your logrotate process. See FAQ-COM120 for details.
- Or add instructions in your crontab (Unix/Linux) or your task scheduler (Windows), to regularly launch the Awstats update process. See FAQ-COM130 for details.
See the AWStats Benchmarks page for the recommended update/logrotate frequency.
手动更新Log数据
perl awstats.pl -config=mysite -update
访问AWSTATS日志分析
http://www.myserver.mydomain/awstats/awstats.pl?config=mysite
------------------------------------------------------------
End



