CentOS 7.2配置Apache服务httpd(下)

2019-01-17 02:19:20刘景俊

[1] 安装AWstats。 

# install from EPEL [root@linuxprobe ~]# yum --enablerepo=epel -y install awstats # awstats.(hostname).conf是自动生成的 [root@linuxprobe ~]# vi /etc/awstats/awstats.linuxprobe.org.conf # line 122: change # if your config for log format in httpd.conf is 'combined' Set here '1' # If log-config is 'common' set here '4', but in this case, some informations can't be get (browser info and so on) LogFormat=1 # line 153: specify your hostname SiteDomain="linuxprobe.org # line 168: set IP address you'd like to exclude HostAliases="localhost 127.0.0.1 REGEX[server.world$] REGEX[^10.1.1.] " [root@linuxprobe ~]# vi /etc/httpd/conf.d/awstats.conf # line 30: IP address you permit to access Require ip 10.1.1.0/24 [root@linuxprobe ~]# systemctl restart httpd # generate reports ( reports are updated for hourly by Cron ) [root@linuxprobe ~]# /usr/share/awstats/linuxproberoot/cgi-bin/awstats.pl -config=linuxprobe.org -update Create/Update database for config "/etc/awstats/awstats.linuxprobe.org.conf" by AWStats version 7.4 (build 20150714) 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: 165 Found 0 dropped records, Found 0 comments, Found 0 blank records, Found 0 corrupted records, Found 0 old records, Found 165 new qualified records.

[2]访问“http://(您的服务器的名称或IP地址/)/awstats/awstats.pl”,然后显示以下屏幕,可以看到httpd日志报告。

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持易采站长站。

您可能感兴趣的文章:

CentOS 7.2配置Apache服务httpd(上)CentOS下Lighttpd Web服务器安装与配置方法CentOS7配置httpd虚拟主机教程Centos 6中编译配置httpd2.4的多种方法详解