分享火力

Freeware 免費軟體 - [教學] 超級網站記錄分析 Awstats 安裝指南(windows)

theRip - 2005-03-22 00:08
文章主題: [教學] 超級網站記錄分析 Awstats 安裝指南(windows)
Awstats for windows

最新版本: 6.4 (2005.3.22)
使用系統: windows
下載位址: http://nchc.dl.sourceforge.net/sourceforge/awstats/awstats-6.4.exe
軟體網站: http://awstats.sourceforge.net/
檔案大小: 876 kb
軟體種類: 網站分析
軟體教學: 轉載自 http://taiwan.cnet.com/computer/network/features/0,2000068598,20092921,00.htm

一般商業網站在後端管理程式提供網站分析的工具,不但可以統計流量,還可以分月、分日甚至分小時來做統計,還有分析使用者的來源,哪些文章最多人瀏覽,使用什麼瀏覽器等等,讓管理者能夠做出適當的判斷,來提供使用者更喜歡的內容資訊。

當然,一般這種工具效用龐大,所以也是要花錢購買的。不過網路上也有免費的網頁分析工具,就是我們這次要介紹的 AWStats(Advanced web statistics) ,不但功能強大不輸專業的網站分析工具,甚至可以分析 Ftp 、 Mail 伺服器的使用,所以拿來用在我們的 blog 上,稍微有點殺機用牛刀的感覺。

廢話不多說,首先,先到 AWStats 的官方網站上下載 AWStats ,目前穩定的版本已經出到了 6.1 ,而最新的 6.2 還是測試版,而且也沒有支援 win32 ,所以我們選擇下載 awstats-61.exe

awstats 是用 Perl 寫成,所以我們要先下載 ActivePerl 這個支援 win32 的 Perl 解譯器。選擇 download 之後,填一點必要的資料後就可以進入下載網頁,我們選擇 ActivePerl 5.8.4 for windows 的 MSI 封裝包。

ActivePerl 安裝就像一般的 windows 軟體一樣,一直按下一步即可,安裝的過程比較久,要等待一下。













然後開始安裝 AWstats ,我們將安裝目錄改成 C:\appserv\www\ 底下,比較方便管理。



安裝完後, AWStats 會自動執行 configure.pl 將一些設定匯入到 Apache 的 config 檔中。

輸入你的 Apache 目錄,如果你和我們一路走來,請輸入 c:\appserv\apache



輸入你的 apache 的 config 檔目錄,請輸入 c:\appserv\apache\conf\httpd.conf



選擇 Y 新增一個 AWStats 的 config 檔。



輸入你的blog名稱



完成。



接下來要更改一些設定檔。打開 C:\AppServ\apache\conf\httpd.conf ,如果最後面沒有這一段,就加上:

#
# Directives to allow use of AWStats as a CGI
#
Alias /awstatsclasses "C:/appserv/www/AWStats/wwwroot/classes/"
Alias /awstatscss "C:/appserv/www/AWStats/wwwroot/css/"
Alias /awstatsicons "C:/appserv/www/AWStats/wwwroot/icon/"
ScriptAlias /awstats/ "C:/appserv/www/AWStats/wwwroot/cgi-bin/"

#
# This is to permit URL access to scripts/files in AWStats directory.
#
<Directory "C:/appserv/www/AWStats/wwwroot">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>

然後找到程式集中的 Appserv --> Apache Control Server --> Restart ,重新啟動 Apache 。



再來打開 C:\AppServ\www\AWStats\wwwroot\cgi-bin\awstat.YOUR_SITE.conf ,找到
LogFile="/var/log/httpd/mylog.log"

改為
LogFile=”C:\appserv\apache\logs\access.log”

AllowToUpdateStatsFromBrowser=0
將 0 改為 1

Lang="auto"
改為
Lang="tw"

接下來要做第一次 log 檔的更新,把 apache 之前的 log 轉成 AWstats 的格式。
按開始 --> 執行,輸入 cmd ,按 ENTER ,在命令模式下輸入
cd c:\appserv\www\awstats\wwwroot\cgi-bin\
然後再執行
awstats.pl -config=YOUR_SITE –update
AWStats 就會去更新 log 檔。

在瀏覽器中輸入 http://localhost/cgi-bin//printenv.pl ,複製第二行的粗黑字,然後編輯軟體如 wordpad 打開 c:\appserv\www\awstats\wwwroot\cgi-bin\awstats.pl
將第一行的
#!/usr/bin/perl
改成你剛剛複製的粗黑字。

這樣就算大概完成了,到你的瀏覽器中輸入
http://localhost/awstats/awstats.pl?config=YOUR_SITE
就可以看到你的 blog 的流量分析了,還是中文的喔。


some - 2005-03-22 02:47
文章主題:
很詳細喔

謝謝熱心 Surprised
hiapple - 2005-04-22 22:36
文章主題:
請問.....其中一動是....

輸入你的blog名稱....我跟您一樣輸入 CNET_tw_blog

我要輸入甚麼呢, 因為系統出現
cant't open server log file " c:\appserv\apache\log\access.lpg"

我該怎麼辦
some - 2005-04-24 04:10
文章主題:
hiapple 寫到:
請問.....其中一動是....

輸入你的blog名稱....我跟您一樣輸入 CNET_tw_blog

我要輸入甚麼呢, 因為系統出現
cant't open server log file " c:\appserv\apache\log\access.lpg"

我該怎麼辦


打開您已經生成的 .conf 檔案

找到
代碼:
LogFile="c:\appserv\apache\log\access.log"


把 內容換成你的 apache 的 log 檔即可..
eduyian - 2006-02-08 16:00
文章主題:
請問大大:
我到我的統計頁面,按下立即更新後,便出現以下畫面...請問我該如何處理?謝謝大大!

Error: Couldn't open server log file "”C:\appserv\apache\logs\access.log”" : Invalid argument

Setup ('c:\appserv\www\awstats\wwwroot\cgi-bin/awstats.yianru.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
ejo31 - 2006-02-09 17:22
文章主題:
eduyian 寫到:
請問大大:
我到我的統計頁面,按下立即更新後,便出現以下畫面...請問我該如何處理?謝謝大大!

Error: Couldn't open server log file "”C:\appserv\apache\logs\access.log”" : Invalid argument

Setup ('c:\appserv\www\awstats\wwwroot\cgi-bin/awstats.yianru.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

會不會是access.log的路徑有問題
在您的awstats.yianru.conf裡面
LogFile="C:\appserv\apache\logs\access.log"
這個路徑是不是正確的

小弟今天也有安裝這套程式
後來點立即更新也是有問題
但是是說apache的access.log格式有問題
後來小弟把access.log最前面幾個紀錄刪掉後再按立即更新就正常了....真奇怪~
eduyian - 2006-02-14 07:50
文章主題:
恩,謝謝大大,小弟也成功了!
jc_0101 - 2006-09-04 11:45
文章主題: [各位大大請指點]--最後一步,出現的server錯誤~~~
各位大大:
依照上列詳細的操作執行,眼看就快成功了,但在輸入網址後出現:

安裝awstats執行到最後時出現:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

--------------------------------------------------------------
error log 檔出現以下錯誤:

couldn't spawn child process: c:/appserv/apache/cgi-bin/printenv.pl

(已經先裝好ActivePerl ...)

各位大大幫幫忙阿~~
感激~~
some - 2006-09-04 19:07
文章主題: Re: [各位大大請指點]--最後一步,出現的server錯誤~~~
jc_0101 寫到:
各位大大:
依照上列詳細的操作執行,眼看就快成功了,但在輸入網址後出現:

安裝awstats執行到最後時出現:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

--------------------------------------------------------------
error log 檔出現以下錯誤:

couldn't spawn child process: c:/appserv/apache/cgi-bin/printenv.pl

(已經先裝好ActivePerl ...)

各位大大幫幫忙阿~~
感激~~


要修改 httpd.conf 裡面
把 .pl 加入可執行cgi的副檔名 先試看看~
jc_0101 - 2006-09-05 09:49
文章主題:
您好~~
還是出現一樣的錯誤...=.=

真不知道哪裡不行.....@@
ejo31 - 2006-09-05 20:37
文章主題:
您好~
小弟之前是用appserv
後來改用xampp

所以小弟剛剛又裝了一遍awstats
最後竟然出現跟您相同的問題耶!!!
真有意思~哈哈哈~

後來看了一下
應該是最後一個步驟出問題
引言回覆:
在瀏覽器中輸入 http://localhost/cgi-bin//printenv.pl ,複製第二行的粗黑字,然後編輯軟體如 wordpad 打開 c:\appserv\www\awstats\wwwroot\cgi-bin\awstats.pl
將第一行的
#!/usr/bin/perl
改成你剛剛複製的粗黑字。

這一個步驟把路徑改變後
找不到perl編譯器來執行awstats.pl
如果您一開始安裝的ActivePerl是安裝到c:\perl
那麼請把awstats.pl第一行的
#!/usr/bin/perl
改成
#!C:\Perl\bin\perl.exe

預祝您順利!
文章列印模式 - [教學] 超級網站記錄分析 Awstats 安裝指南(windows)
Powered by 分享火力, 最棒的社群網站