CentOS7 installed the latest version of Awstats, added alias in httpd.conf, you can access the URL directly into the browsing. is not safe.
To add a password to the access method:
[[email protected] wwwroot]# htpasswd-bc/home/awstats/wwwroot/.htpasswd AAA 123456[[email protected] wwwroot]# Nano/et c/httpd/conf/httpd.conf #修改 Apache configuration file, add restrictions to Awstats: Alias/awstatscss "/home/awstats/wwwroot/css/" Alias/ Awstatsicons "/home/awstats/wwwroot/icon/" scriptalias/awstats/"/home/awstats/wwwroot/cgi-bin/" # # this was to permit URL access to Scripts/files in AWStats directory.#<directory "/home/awstats/wwwroot" > Options None allowoverride None AuthName "Members Only" authtype basic authuserfile/home/awstats/wwwroot/.htpasswd require Valid-user #Require all granted</directory>
A prompt to enter a password will appear when re-accessing http://www.zbphp.com/awstats/awstats.pl (by default7#zbphp.com):
Linux Apache creates access passwords for Awstats