Webalizer是一個網站的分析軟體, 對管理一個網站是非常重要的工具. 可惜nas的機器預設值是沒有這個東西的, 目前台灣在玩nas的人大都是目標在bt下載東西. 對網站的經營管理毫無興趣, 所以囉, 搜尋網路上關於Webalizer在nas的安裝, 當然沒有一篇是中文的.


後來找到了一篇英文的, 我把它拷貝到這裡來, 做為我的一頁筆記吧.


原址:  http://www.synology.com/enu/forum/viewtopic.php?f=34&t=8979


內容如下:


===============================================================


Webalizer - Read/Graph your Apache access-log
by wizjos on Wed Jun 25, 2008 5:06 pm


Hi all,


Do you want to read/graph your Apache access-log?


Here's how-to:
1.) Telnet in
2.) Update IPKG (IPKG update)
3.) Type 'IPKG install webalizer' and hit enter
4.) If webalizer is installed cd to /usr/syno/apache/conf and edit httpd.conf-user
5.) Make a backup of this file!
6.) Look for 'CustomLog /dev/null common' and place a '#' in front of it
7.) In the same file look for '#CustomLog logs/access_log combined' (some lines down) and remove the '#'
8.) Assuming you want your logfile to be in '/volume1/web/logs' also change the same line and replace 'logs' with '/volume1/web/logs'


This results into the line being: 'CustomLog /volume1/web/logs/access_log combined'


9.) Save the file and restart Apache: /usr/syno/etc/rc.d/S97apache-user.sh restart
10.) Cd into /opt/etc and edit webalizer.conf
11.) Look for '#LogFile /var/lib/httpd/logs/access_log'
12.) Change this into: 'LogFile /volume1/web/logs/access_log'
13.) Look for '#OutputDir /var/lib/httpd/htdocs/usage'
14.) Change this into: '#OutputDir /volume1/web/usage' (assuming that '/volume1/web/usage' is the dir you want the viewable output in
15.) Save the file
16.) Run /opt/bin/webalizer -c /opt/etc/webalizer.conf and see...


This should do the trick!
At least it works well with my CS406 


It might be smart to schedule it using crontab in /etc. Use the above command as the scheduled command.


Regards,


Wizjos


==================================================================


我的問題:
1. 如何編輯出作者所說的檔案和其內容.
2./volume1/web 這個地方就是你的網站的主目錄, /volume1/web/usage 以及/volume1/web/logs 這2個子目錄你要自己建立, /volume1/web/logs/access_log 這個檔案也是你要自己建立一個空白的檔案.
3. 進入 http://你的網站/usage 就看到資料了, 但, 這也會是一個被公開取閱的資料哦. 如何對這個目錄做存取的限制呢?
4. 只要有人進入你的網站, 你的log檔的內容就會更新, 但是Webalizer的分析資料不會同步更新, 你必需再telnet進入你的主機, 執行下面這條指令, 才有最近的網站統計分析資料


/opt/bin/webalizer -c /opt/etc/webalizer.conf


arrow
arrow
    全站熱搜

    伍璆 發表在 痞客邦 留言(0) 人氣()