CentOS 6
Sponsored Link

Access Log Report - AWstats
2014/09/15
 
Install AWstats which reports http logs for analyzing accesses to http server.
[1] Install AWstats.
# install from RPMforge

[root@www ~]#
yum --enablerepo=rpmforge -y install awstats
[root@www ~]#
cp /etc/awstats/awstats.model.conf /etc/awstats/awstats.www.srv.world.conf

[root@www ~]#
vi /etc/awstats/awstats.www.srv.world.conf
# 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, specify your hostname

SiteDomain="
www.srv.world
"
# line 168: set IP address you'd like to exclude

HostAliases="
localhost 127.0.0.1 REGEX[server\.world$] REGEX[^10\.0\.0\.]
"
# line 912: change

Lang="
jp
"
[root@www ~]#
vi /etc/httpd/conf.d/awstats.conf
Alias /awstats/icon/ /var/www/awstats/icon/
ScriptAlias /awstats/ /var/www/awstats/
<Directory "/var/www/awstats">
    DirectoryIndex awstats.pl
    Options ExecCGI
    order deny,allow
    deny from all
    allow from 127.0.0.1
10.0.0.0/24
# IP address you permit

</Directory>
[root@www ~]#
/etc/rc.d/init.d/httpd restart

Stopping httpd:
[  OK  ]

Starting httpd:
[  OK  ]
# generate reports ( reports are updated for hourly by Cron )

[root@www ~]#
/var/www/awstats/awstats.pl -config=www.srv.world -update

Create/Update database for config "/etc/awstats/awstats.www.srv.world.conf" by AWStats version 7.1 (build 1.983)
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: 478
 Found 49 dropped records,
 Found 0 comments,
 Found 0 blank records,
 Found 0 corrupted records,
 Found 0 old records,
 Found 429 new qualified records.
[2] Access to "http://(your server's name or IP address/)/awstats/awstats.pl", then follwing screen is shown and it's possible to see httpd log reports.
Matched Content
 
Tweet