ActivePerl 官方網站:http://www.activestate.com/ AWStats
官方網站:http://awstats.sourceforge.net/ 功能:一個功能強大的訪客資料分析軟體。
雖然網路上有不少免費服務,但是除了 Google Analytics 外,其餘服務的功能都沒有這個強大!如果你還沒有 Google Analytics 帳號,不妨先試試看自己 DIY 安裝這個功能。

- 安裝步驟 安裝 ActivePerl 下載並解壓縮 ActivePerl-5.8.8.817-MSWin32-x86-257965.zip 至任一資料夾中。
- 執行 Installer.bat。
- 詢問 Enter top level directory for install [c:\Perl]: 時請回答 C:\Perl。
- 詢問 Proceed? [y] 時請回答 y。 第三步還是詢問 Proceed? [y],請回答 y。
- 詢問 Create shortcuts to the HTML documentation? [y] 時請回答 n。
- 詢問 Add the Perl\bin directory to the PATH? [y] 時請回答 n。
- 詢問 Create Perl file extension association? [y] 時請回答 n。
- 詢問 Create IIS script mapping for Perl? [y] 時請回答 n。
- 詢問 Create IIS script mapping for Perl ISAPI? [y] 時請回答 n。
- 接下來會開始安裝過程,結束後請按 Enter 離開安裝程式,並且刪除暫存的 ActivePerl 安裝檔。
- 安裝 AWStats 將 ActivePerl-5.8.8.817-MSWin32-x86-257965.zip 解壓縮至網頁資料夾 並將資料夾更名為 awstats。
- 將 awstats/wwwroot/cgi-bin 資料夾下所有檔案移到 awstats 資料夾中。
- 將 awstats/lang 資料夾下的 awstats-tw.txt 以 UTF-8 編碼另存為 awstats-tw-utf8.txt。
- 設定步驟 httpd.conf 設定 用記事本開啟 C:\Program Files\Apache Group\Apache2\conf\httpd.conf,並按照以下原則進行修改。
- 請自行以關鍵字尋找並取代預設設定,若沒有預設設定則新增在檔案最後面即可。
- 強調的部分請依實際情況修改。 請注意斜線(/)與反斜線(\)的不同,以免造成不必要的錯誤。
- 設定完成後必須重新啟動伺服器以套用新的設定。
- 伺服器紀錄檔的紀錄層級 設定說明: 使用 combined 可紀錄最詳細的資料,當然也會耗掉最多的磁碟空間。不過有了這個統計程式後,已經統計過的資料便可刪除,以減輕硬碟負擔。
- CustomLog logs/access.log combined AWStats 程式設定 設定說明: 各種有關 AWStats 程式的設定,請注意各個資料夾的路徑,務必設置正確! Alias /awstatsclasses "D:/www/awstats/wwwroot/classes/" Alias /awstatscss "D:/www/awstats/wwwroot/css/" Alias /awstatsicons "D:/www/awstats/wwwroot/icon/" ScriptAlias /awstats/ "D:/www/awstats/" AWStats 相關設定 修改 awstats.pl 的第一行。原本內容為 #!/usr/bin/perl,修改為 #!C:/Perl/bin/perl.exe 後存檔。
- 將 awstats.model.conf 複製一份,並重新命名為 awstats.[使用者名稱].conf,例如 awstats.chweng.conf。
- 修改 awstats.[使用者名稱].conf 內容如下: LogFile="D:/www/logs/access.log" LogType=W LogFormat=1 SiteDomain="www.chweng.idv.tw" DirIcons="/awstatsicons" AllowToUpdateStatsFromBrowser=0 Lang="tw-utf8" LoadPlugin="decodeutfkeys" 更新統計資料的方法 將下面指令作成捷徑,每次執行捷徑時,會自動更新統計資料。
- C:\Perl\bin\perl.exe D:\www\awstats\awstats.pl -config=chweng -update 觀看統計資料的方法 統計資料網頁的網址:http://[你的域名]/awstats/awstats.pl?config=[使用者名稱]
※本文為熊爸多年前找到的資料,因怕找不到而記錄在網誌,如有知悉出處再煩請告知,謝謝!!
« Prev:移除Apache的方法 我叫"莊馥璟":Next »