免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: missing-cn
打印 上一主题 下一主题

[Web] 日志分析软件awstats的安装使用简易指南 [复制链接]

论坛徽章:
1
处女座
日期:2013-08-19 15:17:06
11 [报告]
发表于 2005-11-30 14:40 |只看该作者
原帖由 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 看看结果。

论坛徽章:
0
12 [报告]
发表于 2005-11-30 15:57 |只看该作者
执行perl awstats.pl 的结果

[code]
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[/code]

论坛徽章:
0
13 [报告]
发表于 2005-11-30 15:58 |只看该作者
httpd.conf中user条目中设置用户是apache,awstats.pl的权限是
-rwxr-xr-x  1 root apache 527395 Feb 26  2005 awstats.pl

论坛徽章:
0
14 [报告]
发表于 2005-12-01 09:43 |只看该作者
我只找到繁体中文的,好象没有简体

论坛徽章:
1
处女座
日期:2013-08-19 15:17:06
15 [报告]
发表于 2005-12-01 17:40 |只看该作者
看了看自己的配置文件,httpd.conf 配置的user是nobody;
awstats安装后主目录的属性是下面的样子
[quote]
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
[quote]
必须保证 awstats下面的data和wwwroot属主和httpd.conf 配置文件的中的user条目中的用户相同,相对你的问题就是apache用户不是该目录及目录下的属主,解决方法su - root ; chown -R apache data wwwroot

论坛徽章:
1
处女座
日期:2013-08-19 15:17:06
16 [报告]
发表于 2005-12-01 17:49 |只看该作者

增加了权限问题解决方法

修补放到了blog里面,有兴趣的可以看一看
http://blog.chinaunix.net/articl ... 192&blogId=8983

论坛徽章:
0
17 [报告]
发表于 2005-12-02 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 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
但还是不行

论坛徽章:
0
18 [报告]
发表于 2005-12-02 16:01 |只看该作者
俺现在使用的是webalizer分析软件,看看啥时候试试awstats这个玩艺。
;)

论坛徽章:
1
处女座
日期:2013-08-19 15:17:06
19 [报告]
发表于 2005-12-02 16:18 |只看该作者
那麻烦你把完整的错误信息,尽量多的提供上来再帮你看看。
原帖由 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 ...

论坛徽章:
0
20 [报告]
发表于 2005-12-02 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 2005] [error] [client xxx] Premature end of script headers: awstats.pl


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

[ 本帖最后由 lingy 于 2005-12-2 16:48 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP