Fedora 14: Install Apache log analizer, AWstats.

[b][1] Install AWstats[/b]
[color=blue]
#yum -y install awstats[/color]

[color=blue]#vi /etc/awstats/awstats.www03.server.world.conf # this file is already locate (replace your server's name)
[/color]
# line 122: change
# if your config for log format in httpd.conf is 'combined' Set here '1'
# If log-config is 'common' set here '4', but in this case, some informations can't be get (browser info and so on)
LogFormat=1

# line 153, set your hostname
SiteDomain="www03.server.world"

# line 168: set IP address you'd like to exclude
HostAliases="localhost 127.0.0.1 REGEX[server\.world$] REGEX[^10\.0\.0\.]"
[color=blue]
#vi /etc/httpd/conf.d/awstats.conf[/color]

# add Alias
Alias /report "/usr/share/awstats/wwwroot/"
<Directory "/usr/share/awstats/wwwroot">
Options None
AllowOverride None
Order allow,deny
Allow from 127.0.0.1 10.0.0.0/24 # IP address you allow
</Directory>
[color=blue]
#/etc/rc.d/init.d/httpd restart[/color]
Stopping httpd:[ OK ]
Starting httpd:[ OK ]

# generate reports
[color=blue]# /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=www03.server.world -update[/color]
Create/Update database for config "/etc/awstats/awstats.www03.server.world.conf" by AWStats version 7.0 (build 1.964)
From data in log file "/var/log/httpd/access_log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Jumped lines in file: 0
Parsed lines in file: 29
Found 0 dropped records,
Found 0 comments,
Found 0 blank records,
Found 0 corrupted records,
Found 0 old records,
Found 29 new qualified records.

# generate HTML from reports
[color=blue]#/usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=www03.server.world -output -staticlink > /usr/share/awstats/wwwroot/index.html[/color]

# change cron's setting
[color=blue]#vi /etc/cron.hourly/awstats[/color]

#!/bin/bash
# make it comment
# exec /usr/share/awstats/tools/awstats_updateall.pl now -configdir="/etc/awstats" -awstatsprog="/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" > /dev/null
# add
/usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=www03.server.world -update > /dev/null
/usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=www03.server.world -output -staticlink > /usr/share/awstats/wwwroot/index.html

exit 0

[b][2] Access to 'http://(your server's name or IP address/)/report/', then follwing sacreen is shown and it's possible to see httpd's log. [/b]


Reference: [url]http://www.server-world.info/en/note?os=Fedora_14&p=httpd&f=11[/url]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值