awstatsインストール
[root@falcon21 ~]# yum --enablerepo=epel -y install awstats

自動作成された awstats.falcon21.space.conf を編集
[root@falcon21 ~]# vi /etc/awstats/awstats.falcon21.space.conf

122 LogFormat=1
153 SiteDomain="falcon21.space"

            167 HostAliases="localhost 127.0.0.1 REGEX[falcon21\.space$] REGEX[^192\.168\.10\.]"

-------------------
[root@falcon21 ~]# vi /etc/httpd/conf.d/awstats.conf

      24 <Directory "/usr/share/awstats/wwwroot">

     25     Options None
     26     AllowOverride None
     27     <IfModule mod_authz_core.c>
     28         # Apache 2.4
     29         Require local
     30         Require ip 192.168.10.0/24
     31     </IfModule>
     32     <IfModule !mod_authz_core.c>
     33         # Apache 2.2
     34         Order allow,deny
     35         Allow from 127.0.0.1
     36         Allow from ::1
     37     </IfModule>
     38 </Directory>
     39 # Additional Perl modules
     40 <IfModule mod_env.c>
     41     SetEnv PERL5LIB /usr/share/awstats/lib:/usr/share/awstats/plugins
     42 </IfModule>
     43 <Files "awstats.pl">
     44     Require all denied
     45     Require ip 127.0.0.1
     46     Require ip 192.168.10.0/24
     47 </Files>
 

----------------------------------
[root@falcon21 ~]# systemctl restart httpd

---------------------
1時間毎に自動更新
[root@falcon21 ~]# /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=falcon21.space -update
Create/Update database for config "/etc/awstats/awstats.falcon21.space.conf" by AWStats version 7.7 (build 20180105)
From data in log file "/var/log/httpd/access_log"...
Phase 1 : First bypass old records, searching new record...
Direct access after last parsed record (after line 1657)
Jumped lines in file: 1657
Found 1657 already parsed records.
Parsed lines in file: 0
Found 0 dropped records,
Found 0 comments,
Found 0 blank records,
Found 0 corrupted records,
Found 0 old records,
Found 0 new qualified records.

 

--------------------

投票数:1 平均点:10.00

 
Back to Top