ChinaUnix首页 > 精华文章 > Web服务器 > 正文

[精彩] 日志分析软件awstats的安装使用简易指南


http://www.chinaunix.net 作者:missing-cn  发表于:2008-08-20 16:42:53
发表评论】 【查看原文】 【Web服务器讨论区】【关闭

日志分析软件awstats的安装使用简易指南

1. 下载地址

   http://sourceforge.net/projects/awstats/ 
   
   http://voxel.dl.sourceforge.net/sourceforge/awstats/awstats-6.4-1.noarch.rpm
2. 安装   
   2.1 rpm安装

[root@web tools]# rpm -ivh awstats-6.4-1.noarch.rpm 
Preparing...                ########################################### [100%]
   1:awstats                ########################################### [100%]

----- AWStats 6.4 - Laurent Destailleur -----
AWStats files have been installed in /usr/local/awstats

If first install, follow instructions in documentation
(/usr/local/awstats/docs/index.html) to setup AWStats in 3 steps:
Step 1 : Install and Setup with awstats_configure.pl (or manually)
Step 2 : Build/Update Statistics with awstats.pl
Step 3 : Read Statistics
   
   2.2 tar包安装
   
       直接解压就行了,因为awstats是由perl编写的。其实都一样。
       
3. 运行配置脚本生成awstats的配置文件
   cd /usr/local/awstats/tools
   perl awstats_configure.pl 
   配置脚本询问域名等问题,假设回答的域名为www.abcd.com
   3.1 生成的配置文件会放在/etc/awstats/下面
   3.2 生成的配置文件的名称为awstats.www.adcd.com.conf
   3.3 配置脚本只能修改主要的log日志为combined,如果设置了虚拟主机,需要分别修改虚拟主机中的日志配置。
       格式设置 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
        自定义的日志采用什么格式 CustomLog logs/testmysite-access_log combined
        创建日志 TransferLog logs/testmysite-access_log
        
4. 编辑awstats.www.abcd.com.conf,保证awstats的正常运行

   4.1 设置web server的logfile位置
       编辑LogFile为web server的log文件位置
       LogFile=/usr/local/apache2/logs/abcd-access_log
       一定保证和httpd.conf中的log文件保证一致,httpd.conf中log名称为
       logs/abcd-access_log
   4.2 设置要分析的服务日志类型
       LogType=W  
       w表示为WEB日志
   4.3 设置日志格式
       LogFormat=1 
       1表示采用NCSA apache combined/ELF/XLF log format
   4.4 设置所要分析网站域名
       SiteDomain="www.testmysite.com.cn"
       引号中一定要填上域名,或者服务器主机名
   4.5 设置awstats的数据库存放目录
       DirData="/usr/local/awstats/data"
   
5. 创建awstats初始化数据库

   perl awstats.pl -config=www.abcd.com -update 
   
6. 创建awstats的初始化静态统计页面

   perl awstats.pl -config=bbs.testmysite.com.cn -output -staticlinks > awstats.bbs.html 
   
7. 通过浏览器刷新统计页面

   7.1 修改awstats.www.testmysite.com.cn.conf中
       AllowToUpdateStatsFromBrowser=1
   7.2 修改awstats的存放数据目录的属性为apache的运行用户可读写
       chown -R nobody /usr/local/awstats/data
   7.3 检查/usr/local/awstats/wwwroot/cgi-bin/*.pl 是否有执行权限
       chmod +x /usr/local/awstats/wwwroot/cgi-bin/*.pl    
       
       注:rpm安装包里面的*.pl都具有执行权限,tar包里面的*.pl却没有。
       

8. 设置需要认证才能访问流量统计页面

   8.1 设置用户admin有权访问该页面
       cd /usr/local/apache2/bin
       ./htpasswd  -c /usr/local/apache2/passwords admin
       按提示连续输入两次密码,这样就创建了admin用户才能访问流量统计页面。
       
   8.2 设置httpd.conf中的awstats条目增加如下内容
           AuthType Basic
           AuthName "Restricted Files"
           AuthUserFile /usr/local/apache2/passwords
           Require user admin
           
9. 两种观看日志分析方法的比较
   
   9.1 静态页面分析方法的优点
       a. 安全性高,因为分析过程可以在后台通过crontab来执行,不需要执行cgi.
       b. 统计分析页面响应速度快,因为是自动生成的静态页面,所以速度快过动态生成的页面。
       c. 对服务器的负载影响可控,自动生成的脚本执行次数一定,对服务器的负载影响也是一定的。
   9.2 动态页面分析方法的优点
       a. 实时查看,可以随时在页面动态刷新统计分析结果。
       
   9.3 上面两种方法的缺点就是他们优点的反面。
   
10. awstats在apache虚拟主机下的配置    
       
   10.1 虚拟主机有3个
        www.testmysite.com.cn
        bbs.testmysite.com.cn
        diy.testmysite.com.cn
   10.2 生成并修改对应虚拟主机的配置文件
   
        cd /etc/awstats
        cp awstats.www.testmysite.com.cn.conf awstats.bbs.testmysite.com.cn.conf
        cp awstats.www.testmysite.com.cn.conf awstats.diy.testmysite.com.cn.conf
   10.3 修改配置文件中的下列各项  
        LogFile=/usr/local/apache2/logs/bbs-accesss_log
        修改为实际的虚拟主机的log文件位置
        SiteDomain="bbs.testmysite.com.cn"
        修改为实际各虚拟主机的域名
   10.4 修改httpd.conf各虚拟主机中的配置
        <VirtualHost 202.108.59.23>
        。。。。。。
        CustomLog logs/testmysite-access_log combined
        TransferLog logs/testmysite-access_log
        。。。。。。
        </VirtualHost> 
        主要是修改日志格式保证apache输出的日志格式和awstats配置文件中配置一致。
12. 观看流量统计方法

    12.1 用户名&密码
         admin/testmysiteok
    12.2 在浏览器输入
         
         查看主页流量分析
         http://www.testmysite.com.cn/awstats/awstats.pl?config=www.testmysite.com.cn
         查看bbs流量分析
         http://www.testmysite.com.cn/awstats/awstats.pl?config=bbs.testmysite.com.cn
         查看diy流量分析
         http://www.testmysite.com.cn/awstats/awstats.pl?config=diy.testmysite.com.cn
         
         为了便于使用可以将以上连接加入收藏夹。



 1jjk 回复于:2005-11-04 18:13:45

建议版主给此主题加精!
很难得!
支持楼主!
因为这个相信很多人也在寻找!


 ydlhero 回复于:2005-11-06 18:48:14

我是 校园网
不可以访问


 suran007 回复于:2005-11-14 10:41:47

最后生成的静态统计页面是英文的,怎么将页面变成中文的?


 HonestQiao 回复于:2005-11-14 11:28:20

引用:原帖由 suran007 于 2005-11-14 10:41 发表
最后生成的静态统计页面是英文的,怎么将页面变成中文的? 




配置文件里面可以设置预言的,你可以大开配置文件看看


 lingy 回复于:2005-11-14 15:53:59

真是篇好文


这里是修改语言吗?
# Plugin: DecodeUTFKeys
# Perl modules required: Encode and URI::Escape
# Allow AWStats to show correctly (in language charset) keywords/keyphrases
# strings even if they were UTF8 coded by the referer search engine.
#
#LoadPlugin="decodeutfkeys"

该怎么设置?

[ 本帖最后由 lingy 于 2005-11-14 16:01 编辑 ]


 missing-cn 回复于:2005-11-15 13:24:16

引用:原帖由 lingy 于 2005-11-14 15:53 发表
真是篇好文


这里是修改语言吗?


 # Plugin: DecodeUTFKeys
# Perl modules required: Encode and URI::Escape
# Allow AWStats to show correctly (in language charset) keywords/keyphrases
# strings  ... 



 

# Set your primary language (ISO-639-1 language codes).
# Possible value:
#  Albanian=al, Bosnian=ba, Bulgarian=bg, Catalan=ca,
#  Chinese (Taiwan)=tw, Chinese (Simpliefied)=cn, Czech=cz, Danish=dk,
#  Dutch=nl, English=en, Estonian=et, Euskara=eu, Finnish=fi,
#  French=fr, Galician=gl, German=de, Greek=gr, Hebrew=he, Hungarian=hu,
#  Icelandic=is, Indonesian=id, Italian=it, Japanese=jp, Korean=kr,
#  Latvian=lv, Norwegian (Nynorsk)=nn, Norwegian (Bokmal)=nb, Polish=pl,
#  Portuguese=pt, Portuguese (Brazilian)=br, Romanian=ro, Russian=ru,
#  Serbian=sr, Slovak=sk, Slovenian=si, Spanish=es, Swedish=se, Turkish=tr,
#  Ukrainian=ua, Welsh=cy.
#  First available language accepted by browser=auto
# Default: "auto"
#
Lang="auto"


# Set the location of language files.
# Example: "/usr/share/awstats/lang"
# Default: "./lang" (means lang directory is in same location than awstats.pl)
#
DirLang="./lang"
 



 lingy 回复于:2005-11-30 08:49:46

为什么出现
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email]XXX@163.com[/email] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


 missing-cn 回复于:2005-11-30 12:42:39

apache的错误日志贴出来看看。
引用:原帖由 lingy 于 2005-11-30 08:49 发表
为什么出现
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email]XXX@163.c ... 




 lingy 回复于:2005-11-30 13:20:23

(13)Permission denied: exec of '/usr/local/awstats/wwwroot/cgi-bin/awstats.pl' failed

 Premature end of script headers: awstats.pl

[ 本帖最后由 lingy 于 2005-11-30 13:21 编辑 ]


 missing-cn 回复于:2005-11-30 14:40:53

引用:原帖由 lingy 于 2005-11-30 13:20 发表
(13)Permission denied: exec of '/usr/local/awstats/wwwroot/cgi-bin/awstats.pl' failed

 Premature end of script headers: awstats.pl 



权限问题,检查:
1。必须保证apache的用户身份能执行awstats.pl,看一下httpd.conf中user条目中设置用户是不是nobody,nobody是否有权执行awstats.pl文件
2。系统上安装perl了吗? 
3。可以尝试手动执行awstats.pl看看结果 例如 perl awstats.pl 看看结果。


 lingy 回复于:2005-11-30 15:57:11

执行perl awstats.pl 的结果


AWStats is a free web server logfile analyzer to show you advanced web
statistics.
AWStats comes with ABSOLUTELY NO WARRANTY. It's a free software distributed
with a GNU General Public License (See LICENSE file for details).

Syntax: awstats.pl -config=virtualhostname 

  This runs awstats in command line to update statistics of a web site, from
   the log file defined in AWStats config file (with -update option), or build
   a HTML report (with -output option).
  First, awstats tries to read awstats.virtualhostname.conf as the config file.
  If not found, awstats tries to read awstats.conf
  Note 1: Config files (awstats.virtualhostname.conf or awstats.conf) must be
   in /etc/awstats, /usr/local/etc/awstats, /etc or same directory than
   awstats.pl script file.
  Note 2: If AWSTATS_FORCE_CONFIG environment variable is defined, AWStats will
   use it as the "config" value, whatever is the value on command line or URL.
   See AWStats documentation for all setup instrutions.

Options to update statistics:
  -update        to update statistics (default)
  -showsteps     to add benchmark information every 8192 lines processed
  -showcorrupted to add output for each corrupted lines found, with reason
  -showdropped   to add output for each dropped lines found, with reason
  -updatefor=n   to stop the update process after parsing n lines
  -LogFile=x     to change log to analyze whatever is 'LogFile' in config file
  Be care to process log files in chronological order when updating statistics.

Options to show statistics:
  -output      to output main HTML report (no update made except with -update)
  -output=x    to output other report pages where x is:
               alldomains       to build page of all domains/countries
               allhosts         to build page of all hosts
               lasthosts        to build page of last hits for hosts
               unknownip        to build page of all unresolved IP
               allemails        to build page of all email senders (maillog)
               lastemails       to build page of last email senders (maillog)
               allemailr        to build page of all email receivers (maillog)
               lastemailr       to build page of last email receivers (maillog)
               alllogins        to build page of all logins used
               lastlogins       to build page of last hits for logins
               allrobots        to build page of all robots/spider visits
               lastrobots       to build page of last hits for robots
               urldetail        to list most often viewed pages 
               urldetail:filter to list most often viewed pages matching filter
               urlentry         to list entry pages
               urlentry:filter  to list entry pages matching filter
               urlexit          to list exit pages
               urlexit:filter   to list exit pages matching filter
               osdetail         to build page with os detailed versions
               browserdetail    to build page with browsers detailed versions
               unknownbrowser   to list 'User Agents' with unknown browser
               unknownos        to list 'User Agents' with unknown OS
               refererse        to build page of all refering search engines
               refererpages     to build page of all refering pages
               keyphrases       to list all keyphrases used on search engines
               keywords         to list all keywords used on search engines
               errors404        to list 'Referers' for 404 errors
  -staticlinks to have static links in HTML report page
  -staticlinksext=xxx to have static links with .xxx extension instead of .html
  -lang=LL     to output a HTML report in language LL (en,de,es,fr,it,nl,...)
  -month=MM    to output a HTML report for an old month MM
  -year=YYYY   to output a HTML report for an old year YYYY
  Those 'date' options doesn't allow you to process old log file. They only
  allow you to see a past report for a chosen month/year period instead of
  current month/year.

Other options:
  -debug=X     to add debug informations lesser than level X (speed reduced)

Now supports/detects:
  Web/Ftp/Mail log analyze (and load balanced log files)
  Reverse DNS lookup (IPv4 and IPv6) and GeoIP lookup
  Number of visits, number of unique visitors
  Visits duration and list of last visits
  Authenticated users
  Days of week and rush hours
  Hosts list and unresolved IP addresses list
  Most viewed, entry and exit pages
  Files type and Web compression (mod_gzip, mod_deflate stats)
  Screen size
  Number of times site is 'added to favorites bookmarks'
  Ratio of Browsers with support of: Java, Flash, RealG2 reader,
                        Quicktime reader, WMA reader, PDF reader
  Configurable personalized reports
  269 domains/countries
  335 robots
  5 worm's families
  35 operating systems
  99 browsers
  132 search engines (and keyphrases/keywords used from them)
  All HTTP errors with last referrer
  Report by day/month/year
  Dynamic or static HTML or XHTML reports, static PDF reports
  Indexed text or XML monthly database
  And a lot of other advanced features and options...
New versions and FAQ at http://awstats.sourceforge.net



 lingy 回复于:2005-11-30 15:58:48

httpd.conf中user条目中设置用户是apache,awstats.pl的权限是
-rwxr-xr-x  1 root apache 527395 Feb 26  2005 awstats.pl


 bqsc 回复于:2005-12-01 09:43:03

我只找到繁体中文的,好象没有简体


 missing-cn 回复于:2005-12-01 17:40:53

看了看自己的配置文件,httpd.conf 配置的user是nobody;
awstats安装后主目录的属性是下面的样子
引用:
bash-2.05# ls -l
total 22
-rw-r--r--   1 root     other       6721 Aug 19 16:27 README.TXT
drwxr-xr-x   2 nobody   other       1024 Nov 15 11:33 data
drwxr-xr-x   3 root     other       1024 Aug 19 16:27 docs
drwxr-xr-x   4 root     other        512 Aug 19 16:27 tools
drwxr-xr-x  12 nobody   other        512 Aug 22 17:55 wwwroot
bash-2.05# pwd
/usr/local/awstats
引用:
必须保证 awstats下面的data和wwwroot属主和httpd.conf 配置文件的中的user条目中的用户相同,相对你的问题就是apache用户不是该目录及目录下的属主,解决方法su - root ; chown -R apache data wwwroot


 missing-cn 回复于:2005-12-01 17:49:13

修补放到了blog里面,有兴趣的可以看一看
http://blog.chinaunix.net/article.php?articleId=55192&blogId=8983


 lingy 回复于:2005-12-02 09:22:18

奇怪,这是我的httpd.conf
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.  
#
# User/Group: The name (or #number) of the user/group to run httpd as.
#  . On SCO (ODT 3) use "User nouser" and "Group nogroup".
#  . On HPUX you may not be able to use shared memory as nobody, and the
#    suggested workaround is to create a user www and use that user.
#  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
#  when the value of (unsigned)Group is above 60000; 
#  don't use Group #-1 on these systems!
#
User apache
Group apache



[root@www awstats]# ll
total 44
drwxr-xr-x  2 apache root   4096 Nov 30 10:35 data
drwxr-xr-x  3 root   root   4096 Nov 14 14:29 docs
-r--r--r--  1 root   root   6721 Feb 26  2005 README.TXT
drwxr-xr-x  4 root   root   4096 Nov 14 14:29 tools
drwxr-xr-x  7 apache apache 4096 Nov 14 14:29 wwwroot
但还是不行


 gaussong 回复于:2005-12-02 16:01:53

俺现在使用的是webalizer分析软件,看看啥时候试试awstats这个玩艺。
;)


 missing-cn 回复于:2005-12-02 16:18:59

那麻烦你把完整的错误信息,尽量多的提供上来再帮你看看。
引用:原帖由 lingy 于 2005-12-2 09:22 发表
奇怪,这是我的httpd.conf
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.  
#
# User/Group: The name (or #number) of the us ... 




 lingy 回复于:2005-12-02 16:46:43

麻烦missing-cn 了
error_log的纪录就两条
[Fri Dec 02 16:44:53 2005] [error] [client xxx] (13)Permission denied: exec of '/usr/local/awstats/wwwroot/cgi-bin/awstats.pl' failed
[Fri Dec 02 16:44:53 2005] [error] [client xxx] Premature end of script headers: awstats.pl


apache是否需要调用perl模块,怎样测试apache是否支持perl

[ 本帖最后由 lingy 于 2005-12-2 16:48 编辑 ]


 missing-cn 回复于:2005-12-02 17:21:09

引用:原帖由 lingy 于 2005-12-2 16:46 发表
麻烦missing-cn 了
error_log的纪录就两条
[Fri Dec 02 16:44:53 2005] [error] [client xxx] (13)Permission denied: exec of '/usr/local/awstats/wwwroot/cgi-bin/awstats.pl' failed
[Fri Dec 02 16:44:53 ... 




想看看完整的httpd.conf了,方便的时候贴贴。


 goodcjh2005 回复于:2005-12-08 09:57:10

精辟,值得学习


 dgvri 回复于:2006-03-30 10:19:26

有没有办法让它不统计一个我指定的IP的访问量,比如公司的出口IP,就没必要统计,有没有这样的项,找了好几遍都没看到。


 missing-cn 回复于:2006-04-04 16:34:58

应该是没有的。


 dgvri 回复于:2006-04-05 08:57:37

有,是这一个:
SkipHosts="X。X。X。X    X。X。X。X"
我试了,可以用,它的意思是跳过指定的IP,就是不统计指定期IP的访问量。


 missing-cn 回复于:2006-04-05 10:11:30

惭愧!收回楼上的话。因为很久不用awstat了,看到你的问题,就大概回忆了一下,就给出结论了,实在不好意思。

引用:原帖由 dgvri 于 2006-4-5 08:57 发表
有,是这一个:
SkipHosts="X。X。X。X    X。X。X。X"
我试了,可以用,它的意思是跳过指定的IP,就是不统计指定期IP的访问量。 




 cxm.cm 回复于:2006-04-05 10:50:54

大家可以下载6.4的包,这个包都是中文的!


 vepeta 回复于:2006-06-29 17:10:24

我现在正在整6.5,这篇文章对我帮助很多!


 pilgrim_kevin 回复于:2006-08-02 03:52:17

不得不顶一下。


 wgl155 回复于:2006-08-07 16:38:23

我通过ip地址的方式可以解决了这个问题 但是不知为什么?
比如:http://211.xxx.xxx.xxx/awstats/awstats.pl?config=demo


 ndren 回复于:2006-08-07 16:47:24

尽管目前我还用不上,不过仍旧很感谢楼主的奉献。


 HonestQiao 回复于:2006-08-07 17:12:55

呵呵,我都用了多年了,从单机到集群的,我都用它。


 spiceboy 回复于:2006-08-08 03:01:03

这玩意儿挺好使的。
一直用。
不过,能把ip换成手机号码来统计吗?还没研究过呢。
谁用过?


 HonestQiao 回复于:2006-08-08 08:34:35

引用:原帖由 spiceboy 于 2006-8-8 03:01 发表
这玩意儿挺好使的。
一直用。
不过,能把ip换成手机号码来统计吗?还没研究过呢。
谁用过? 



你是想统计wap啊,那也应该是可以的啊。


 hoo7 回复于:2006-08-08 16:53:42

由于日志格式不正确,会出现:

Your AWStats LogFormat parameter is:
1
This means each line in your web server log file need to have "combined log format" like this:
111.22.33.44 - - [10/Jan/2001:02:14:14 +0200] "GET / HTTP/1.1" 200 1234 "http://www.fromserver.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"

如果在awstats.www.conf中
修改

#LogFormat=1
LogFormat = "%virtualname %host %host_r %other %other %time1 %methodurl %code %bytesd %referer"

就会出现

Your AWStats LogFormat parameter is:
%virtualname %host %host_r %other %other %time1 %methodurl %code %bytesd %referer
This means each line in your web server log file need to have the following personalized log format:
%virtualname %host %host_r %other %other %time1 %methodurl %code %bytesd %referer




我要修改awstats的日志格式,因该在哪修改?
谢谢!


 wxyhb 回复于:2006-09-30 08:18:27

我的都配起来了,但IE访问时打出如下日志:
Warning: Perl versions before 5.6 cannot handle nested includes
我perl -v
This is perl, v5.8.0 built for i386-linux-thread-multi
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2002, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.

哪位遇到过,我该如何做?谢谢!


 webiase 回复于:2007-06-28 09:47:48

Webiase是一个基于JAVA的日志分析工具。Webiase的产品理念是Web BI Ease,在设计开发中始终强调简单易用,Webiase的优势在于:
&#8226;        界面友好:Webiase是完全基于Web应用的日志分析工具,浏览器直接调用完成所有系统功能
参考输出样例:http://www.webiase.com/sample
&#8226;        基于java:并且很好的解决了跨平台问题,系统本身可以运行在GNU/Linux上或Windows上;分析的日志直接支持Apache格式 (combined)和IIS格式(需要修改)。
Webiase完全可以实现用一套系统完成对自身站点不同WEB服务器:GNU/Linux/Apache和Windows/IIS服务器的统一统计。
&#8226;        效率比较高:Webiase输出统计项目丰富全面,日志分析速度可以达到7000条/秒左右,对于一个日访问量百万级的站点,这个速度都是足够的;
&#8226;        配置/定制方便:系统提供了足够灵活但缺省也很合理的配置规则,需要修改的缺省配置不超过3,4项就可以开始运行;
&#8226;        Webiase的设计是面向精确的"Human visits"设计的,因此很多搜索引擎的机器人访问都被过滤掉了,因此有可能比其他日志统计工具统计的数字要低,来自公司内部的访问也可以通过IP过滤设置过滤掉(暂不提供)。
&#8226;        可以生成超过30个以上的各种图表,并付带有多个3维统计图.,并且支持导出pdf、excel等各式报表。
日志统计系统在站点的用户行为分析中扮演了重要的角色,尤其是对于来自搜索引擎的关键词访问统计:是很有效的用户行为分析数据来源。

下载路径:http://www.webiase.com/download/Webiase-1.0beta-setup.exe


 dgvri 回复于:2007-07-02 15:02:15

呵呵,才看出来,照楼主的方法,根就无法访问,你忘了把以/usr/local/awstats/tools里的http_conf里的内容加到apache的httpd.conf里了,所以,根本无法访问.
Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/"
Alias /awstatscss "/usr/local/awstats/wwwroot/css/"
Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"

#
# This is to permit URL access to scripts/files in AWStats directory.
#
<Directory "/usr/local/awstats/wwwroot">
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
~


 dgvri 回复于:2007-07-02 15:05:29

hoo7 
圣骑士:::

你不用哪样配,你可以先装个cronlog把日志文件搞成一天一个的,格式如下:
access_log.%y-%m-%d 结果就是access_log.07-07-02   (两位月日年)
然后在awstats的配置文件里把LogFormat 改成:access_log.%YY-%MM-%DD就行了.


 missing-cn 回复于:2007-08-31 12:16:23

都这么久了,还有人看,感慨ing ~ 

考虑是不是把webtrends的经验心得跟大家共享一下。


 kevinadmin 回复于:2008-04-14 13:57:29

引用:原帖由 HonestQiao 于 2006-8-7 17:12 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=5593794&ptid=641101]
呵呵,我都用了多年了,从单机到集群的,我都用它。 




能不能把你的配置给贴出来看看,我最近也要做一个日志分析的,是web集群,你是怎么做的,先把日志分割了,再合并,再分析的吗??


 missing-cn 回复于:2008-04-14 14:56:23

引用:原帖由 kevinadmin 于 2008-4-14 13:57 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=8213153&ptid=641101]



能不能把你的配置给贴出来看看,我最近也要做一个日志分析的,是web集群,你是怎么做的,先把日志分割了,再合并,再分析的吗?? 



这么老得贴子又翻出来了,真让我诧异。。。。

先说一下,awstats只是我们当初从头做网站得时候,对日志分析不太懂,就找了个简单来用,到了后来随着网站得发展壮大发现已经满足不了实际需要,就改用了webtrends来分析。

所以awstats对于集群级别得日志分析已经不合适了:(


 murenfeng 回复于:2008-04-16 02:00:52

日志真的很重要啊,所以更要用好分析日志的工具。


 gron 回复于:2008-08-20 16:42:53

有没有 办法 把多个 虚拟主机的 分别统计出来的页面 放在同一个 浏:em14: 览窗口里啊?




原文链接:http://bbs.chinaunix.net/viewthread.php?tid=641101
转载请注明作者名及原文出处