Computer, telephone
and mobile phone
systems specialists
Telephone: +44 208 292 1691 (English or Japanese speeker)
Telephone: +44 870 392 5969 (Japanese speaker)
Telephone: 050 5327 8990 (Domestic Japan)
Email: contact@ukuniversalsupport.com
English   

日本語     
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].confThis 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.pemYour CA certificate is required to authenticate the client certificate.


# htdigest -c /etc/httpd/.htdigest 'You must be authenticated.' NameOfAdministratorThe 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 requireTo authenticate the client certificate,
SSLVerifyDepth 10To 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 -updateCreate an initial database.

Test the access to https://www.[your domain]/awstats/awstats.pl by a web browser.

数年前にインストールした時よりも、随分と簡単になったなぁ。