Berikut Konfigurasinya :
## back repo to internet ###
[root@www ~]# cd /etc/yum.repos.d/
[root@www yum.repos.d]# mv CentOS-Base.repo.backup CentOS-Base.repo
[root@www yum.repos.d]# mv CentOS-Sources.repo.backup CentOS-Sources.repo
## install epel repo ##
[root@www yum.repos.d]# yum install epel-release -y
## install paket awstats ##
[root@www yum.repos.d]# yum --enablerepo=epel -y install awstats
[root@www yum.repos.d]# mv /etc/awstats/awstats.tkj.net.conf /etc/awstats/awstats.www.tkj.net.conf
[root@www yum.repos.d]# nano /etc/awstats/awstats.www.tkj.net.conf
----------------------------------------------------------------------------------------
# line 153: specify your hostname (Ctrl + w)
SiteDomain="www.tkj.net"
# line 168: set IP address you'd like to exclude (Ctrl + w)
HostAliases="localhost 127.0.0.1 REGEX[^.*tkj\.net$] REGEX[^192\.168\.43\.]"
----------------------------------------------------------------------------------------
[root@www yum.repos.d]# nano /etc/httpd/conf.d/awstats.conf
----------------------------------------------------------------------------------------
# line 30: IP address you permit to access
Require ip 192.168.43.0/24
----------------------------------------------------------------------------------------
[root@www yum.repos.d]# systemctl restart httpd
[root@www yum.repos.d]# /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=www.tkj.net -update
----------------------------------------------------------------------------------------
Create/Update database for config "/etc/awstats/awstats.www.tkj.net.conf" byAWStats version 7.4 (build 20150714)
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: 13
Found 0 dropped records,
Found 0 comments,
Found 0 blank records,
Found 0 corrupted records,
Found 0 old records,
Found 13 new qualified records.
---------------------------------------------------------------------------------------
akses situs http://www.tkj.net/awstats/awstats.pl
Semoga Bermanfaat :)
No comments:
Post a Comment