差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

兩邊的前次修訂版 前次修改
tech:awstats [2012/04/09 19:40] jonathantech:awstats [2012/04/09 19:49] (目前版本) jonathan
行 1: 行 1:
 +====== CentOS 安裝設定 AWStats 分析 http log ======
 +  * 安裝環境 : CentOS 5.8 i386
  
 +===== 安裝程序 =====
 +  * 透過 rpmforge Repository 來安裝
 +<code sh>
 +yum install awstats
 +</code><file>
 +(1/3): perl-Geo-IP-1.38-1.el5.rf.x86_64.rpm
 +(2/3): geoip-1.4.6-1.el5.rf.x86_64.rpm     
 +(3/3): awstats-7.0-2.el5.rf.noarch.rpm     
 +</file>
 +
 +===== 設定程序 =====
 +  * 目標分析兩個 log 
 +    * aremgr (apache) : /var/log/httpd/access_log
 +    * ssl_svn (apache ssl) : /var/log/httpd/ssl_access_log
 +  * 建立兩個 config 檔<code sh>
 +cd /etc/awstats/
 +cp awstats.model.conf awstats.aremgr.conf
 +cp awstats.model.conf awstats.ssl_svn.conf
 +</code>
 +    * /etc/awstats/awstats.awstats.aremgr.conf.conf<file>
 +:
 +SiteDomain="aremgr.ichiayi.com"
 +:
 +</file>
 +    * /etc/awstats/awstats.awstats.aremgr.conf.conf<file>
 +:
 +LogFile="/var/log/httpd/ssl_access_log"
 +:
 +LogFormat = "%host %other %logname %time1 %methodurl %code %bytesd
 +:
 +SiteDomain="aremgr-vpn.ichiayi.com"
 +:
 +ShowAuthenticatedUsers=1
 +:
 +</file>
 +  * 設定 awstats 網頁存取權限
 +    * /etc/httpd/conf.d/awstats.conf<file>
 +:
 +<Directory /var/www/awstats/>
 +    DirectoryIndex awstats.pl
 +    Options ExecCGI
 +#    order deny,allow
 +#    deny from all
 +#    allow from 127.0.0.1
 +</Directory>
 +:
 +</file>
 +  * 設定每小時自動分析 log
 +    * /etc/cron.hourly/00awstats<file>
 +#!/bin/bash
 +
 +if [ -f /var/log/httpd/access_log ] ; then
 +    exec /usr/bin/awstats_updateall.pl now         -confdir="/etc"         -awstatsprog="/var/www/awstats/awstats.pl" >/dev/null
 +fi
 +exit 0
 +</file>
 +  * 透過 AWStats 網頁看成果
 +    * http://aremgr-vpn.ichiayi.com/awstats/awstats.pl?config=aremgr
 +    * http://aremgr-vpn.ichiayi.com/awstats/awstats.pl?config=ssl_svn
 +
 +===== 參考網址 =====
 +  * http://awstats.sourceforge.net
 +  * http://awstats.sourceforge.net/docs/awstats_setup.html
 +  * http://forum.powweb.com/archive/index.php/t-32122.html
 +
 +{{tag>httpd log awstats draft}}