インストール

[root@falcon21 ~]# dnf --enablerepo=epel,PowerTools -y install awstats
インストール済み:
awstats-7.8-1.el8.noarch perl-CGI-4.38-2.el8.noarch
perl-Data-Dump-1.23-7.el8.noarch perl-Data-Validate-IP-0.27-11.el8.noarch
perl-Digest-HMAC-1.03-17.el8.noarch perl-File-Listing-6.04-17.el8.noarch
perl-Geo-IP-1.51-9.el8.x86_64 perl-HTML-Parser-3.72-14.el8.x86_64
perl-HTML-Tagset-3.20-33.el8.noarch perl-HTTP-Cookies-6.04-2.el8.noarch
perl-HTTP-Date-6.02-18.el8.noarch perl-HTTP-Message-6.18-1.el8.noarch
perl-HTTP-Negotiate-6.01-19.el8.noarch perl-IO-HTML-1.001-10.el8.noarch
perl-LWP-MediaTypes-6.02-14.el8.noarch perl-NTLM-1.09-17.el8.noarch
perl-Net-DNS-1.15-1.el8.noarch perl-Net-HTTP-6.17-2.el8.noarch
perl-Net-IP-1.26-20.el8.noarch perl-NetAddr-IP-4.079-7.el8.x86_64
perl-Socket6-0.28-6.el8.x86_64 perl-Switch-2.17-10.el8.noarch
perl-Try-Tiny-0.30-2.el8.noarch perl-WWW-RobotRules-6.02-18.el8.noarch
perl-libwww-perl-6.34-1.el8.noarch

完了しました!

 
  自動作成された、awstats.falcon21.space.conf を編集
[root@falcon21 ~]# vi /etc/awstats/awstats.falcon21.space.conf
    172 # HostAliases="REGEX[^.*falcon21\.space$]"
    173 HostAliases="localhost 127.0.0.1 REGEX[falcon21\.space$] REGEX[^192\.168\.10\.]"
 
 
[root@falcon21 ~]# vi /etc/httpd/conf.d/awstats.conf
      1 #
      2 # Content of this file, with correct values, can be automatically added to
      3 # your Apache server by using the AWStats configure.pl tool.
      4 #
      5
      6
      7 # If using Windows and Perl ActiveStat, this is to enable Perl script as CGI.
      8 #ScriptInterpreterSource registry
      9
     10
     11 #
     12 # Directives to add to your Apache conf file to allow use of AWStats as a CGI.
     13 # Note that path "/usr/share/awstats/" must reflect your AWStats install path.
     14 #
     15 Alias /awstatsclasses "/usr/share/awstats/wwwroot/classes/"
     16 Alias /awstatscss "/usr/share/awstats/wwwroot/css/"
     17 Alias /awstatsicons "/usr/share/awstats/wwwroot/icon/"
     18 ScriptAlias /awstats/ "/usr/share/awstats/wwwroot/cgi-bin/"
     19
     20
     21 #
     22 # This is to permit URL access to scripts/files in AWStats directory.
     23 #
     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>
~
---------------------
 
 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.8 (build 20200416)
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: 4117
 Found 0 dropped records,
 Found 0 comments,
 Found 0 blank records,
 Found 167 corrupted records,
 Found 0 old records,
 Found 3950 new qualified records.
 
 
https://falcon21.space//awstats/awstats.pl に、アクセス。成功。
投票数:0 平均点:0.00

 
Back to Top