顯示頁面舊版反向連結Fold/unfold all回到頁頂 本頁是唯讀的,您可以看到原始碼,但不能更動它。您如果覺得它不應被鎖上,請詢問管理員。 ====== 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}} tech/awstats.txt 上一次變更: 2012/04/09 11:49由 jonathan