2019051801AWStats
Install AWStats into Centos 7.
A client certificate is authenticated to allow to access.
Refer
https://www.ukuniversalsupport.com/TechInfo/2018072801Ssl.php for the client certificate. クライアント証明書で、アクセスを制限しましょう。
# yum -y install epel-release
# yum update
# yum install awstats GeoIP GeoIP-data GeoIP-devel perl-Geo-IP
# cd /etc/awstats
# mv awstats.localhost.localdomain.conf awstats.localhost.localdomain.conf.Original
# mv awstats.model.conf awstats.model.conf.Original
# ls -l awstats.www.[your domain].conf
This will be automatically created when you install awstats by the yum command. If not, create by "cp awstats.model.conf.Original [FQDN].conf"
# vi awstats.www.[your domain].conf
#SiteDomain="localhost.localdomain"
SiteDomain="www.[your domain]"
#DNSLookup=2
DNSLookup=1
#AllowToUpdateStatsFromBrowser=0
AllowToUpdateStatsFromBrowser=1
AllowFullYearView=3
SkipHosts="127.0.0.1 localhost REGEX[^192\.168\.] REGEX[^2a02:8010:64ba:]"
To exclude your computers.
# vi /etc/httpd/conf.d/ssl.conf
SSLCACertificateFile /etc/Certificate/CA/2019042102Ukus.CA.cert.WithCrl.pem
Your CA certificate is required to authenticate the client certificate.
# htdigest -c /etc/httpd/.htdigest 'You must be authenticated.' NameOfAdministrator
The message should be as same as AuthName. After it, specify username.
# vi /etc/httpd/conf.d/awstats.conf
<Directory "/usr/share/awstats/wwwroot">
Satisfy All
Order allow,deny
Allow from all
SSLVerifyClient require
To authenticate the client certificate,
SSLVerifyDepth 10
To authenticate the client certificate,
AuthType Digest
AuthName "You must be authenticated."
AuthUserFile /etc/httpd/.htdigest
Require valid-user
AllowOverride All
</Directory>
# perl /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=/etc/awstats/awstats.www.[your domain].conf -update
Create an initial database.
Test the access to https://www.[your domain]/awstats/awstats.pl by a web browser.
数年前にインストールした時よりも、随分と簡単になったなぁ。