Webalizer †
昨日はあったのに、本日のメンテでfinkからwebalizerパッケージがなくなてる。。汗
- Webalizerとは
Apacheのログ解析をして、アクセス履歴を視覚的に表示してくれるツールです。本家HP。
- インストール
finkにソースパッケージがあるようなのでそれを導入してみます。
- FinkCommanderのアイコンをクリックして立ち上げ、
- toolbarから、FincCommander->Preferencesを開きます。
- Finkタブの Use unstable packages と Use unstable cryptography pacckages
をチェックします。
- そして、FIle->Update Tableを実行。
- さらに、Source->selfupdate-rsyncすると、リストにwebalizerが現れます。
(もしかしたら、Source->selfupdate等もやったかもしれません。ど忘れ)
- webalizerがリストに現れたら、それを選択して、Source->Installを選択。
- 自動的にパッケージのビルドが行われ、インストールされます。
- Webalizerの設定
- /sw/etc/webalizer-landsik.conf
LANDISKで使用していた、debianのwebalizer.confをコピーします。
(設定内容の詳細はLANDISKの設定ページを参照)
以下の箇所をMacOSX用に書き換えます。
LogFile /var/log/httpd/access_log
OutputDir /Users/www/Sites/webalizer
HostName Macmini
なお、OutputDir は Webalizer の集計結果を保存する場所を指定します。
- OutputDirの準備
作成します。
Macmini:~ user$ sudo mkdir /Users/www/Sites/webalizer
Macmini:~ user$ sudo chown -R www:www /Users/www/Sites/webalizer
- /etc/httpd/users/www.conf
ブラウザからアクセスできるよう、Apacheの設定ファイルに、OutputDirの情報を追加します。
なお、全ての人の閲覧権限を与えることは、セキュリティ上好ましくないため、
ローカルネットワークからのみアクセスできるよう設定します。
以下の記述を追加します。
Alias /webalizer /Users/www/Sites/webalizer
<Location /webalizer>
Order deny,allow
Deny from all
Allow from 127.0.0.1
Allow from 192.168.0.0/24
Allow from 192.168.1.0/24
</Location>
- /etc/httpd/httpd.conf
Apacheのログ出力形式をcombine形式?に設定します。
--- /etc/httpd/httpd.conf~ Sat Jul 23 21:26:18 2005
+++ /etc/httpd/httpd.conf Sun Jul 24 03:27:11 2005
@@ -591,7 +591,7 @@
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
-CustomLog "/private/var/log/httpd/access_log" common
+#CustomLog "/private/var/log/httpd/access_log" common
#
# If you would like to have agent and referer logfiles, uncomment the
@@ -604,7 +604,7 @@
# If you prefer a single logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
-#CustomLog "/private/var/log/httpd/access_log" combined
+CustomLog "/private/var/log/httpd/access_log" combined
#
# Optionally add a line containing the server version and virtual host
- WEBサーバの再起動
システム環境設定→共有を開いて、パーソナルWEB共有をチェック外し、再度チェックをしなおすと、
するとWEBサーバが再起動します。