アクセスカウンター(wwwcount)の設定
wwwcountのインス トール
ftp://ftp.turbolinux.co.jp/pub/TurboLinux/stable/untested/6/i386/wwwcount-2.5-1.i386.rpm
からダウンロードする

   現在(2004.11月)TurboLinuxではサポートされていませんので
   下記URLより最新バージョンをダウンロードしてください。
      http://rpmfind.net/linux/rpm2html/search.php?query=wwwcount


適当なディレクトリにファイルをダウンロードし、そのディレクトリでスーパーユーザー(su)になり
 # rpm -Uvh wwwcount-2.5-1.i386.rpm
/etc/wwwcounter.confの設定

# BLOCK 1
# Allow automatic datafile creation or not
# it's a required block. 1 means allow, 0 means do not allow.
####
{
0
}
###
# BLOCK 2
# run the program in strict mode or not.
# it's a required block. 1 means strict, 0 means not strict.
###
{
1
}
####
# BLOCK 3
# Allow to use RGB color database. 1 means allow, 0 means don't.
# convenient to use because colorname e.g., red, gold etc can
# be used instead of rgb components of the color, however it's
# very inefficient to lookup.
####
{
1
}
####
# BLOCK 4
# Ignore count block, you might want to ignore the local sites.
# If you do not want to ignore any hosts from
# counting, just put { on one line and } on the next line but make sure
# the braces exist!
# It's a required block.
##
# netmasks can be used to ignore a entire network or a specific
# range of hosts in the network. Read the counter documentation to
# know about netmasks. Wild carding can be used.
# one item per line.
#131.249.*
####
{
192.168.0.* -------- LANからのアクセスはカウントしない
127.0.0.1 -------- ローカルからのアクセスもカウントしない
}
####
# BLOCK 5
# Auth block
# All possible names and IP addresses by which your host can be referred.
# These hosts can access the counter remotely or locally. Host running
# the http server must exist here. Wild card can be used.
# one item per line.
##
{
192.168.0.6 --------- wwwサーバー(httpd)のIPアドレスへのアクセス時実行する
*.hosoyama.dyn.to --------- すべてのサブドメインへのアクセス時実行する
hosoyama.dyn.to --------- ドメインへのアクセス時実行する
localhost --------- ローカルホストアクセス時実行する
}

Webへの利用法

ホームページに
<img src="cgi-bin/Count.cgi?df=counter.dat&dd=B">
を追加する

オプションの利用

1.文字フォントの指定
dd=A (A〜Eまであります。好みで変更してみてください)

2.フレームの指定

線幅の指定
ft=ピクセル数 (0の場合フレーム無し)

カラー の指定
frgb=カラー名

3種類のカラー名で表記できます。
(1)名称形式 (例:frgb=red)を記述する形式。
(2)RGB形式(範囲は0〜255)をセミコロン(;)で3つに区切った形式(例:frgb=255;255;255)
(3)hex形式(範囲は000000〜ffffff)6桁の16進数で表記する形式(例:frgb=ffaaaa)

3.時間表示

・時間表示(午前・午後)
display=clock

<img src="cgi-bin/Count.cgi?display=clock">

・時間表示(24時間)
display=clock&tformat=24

<img src="cgi-bin/Count.cgi?display=clock&tformat=24">

4.年月日表示

・年月日表示(デフォルトは月・日・年 の順です)
display=date

<img src="cgi-bin/Count.cgi?display=date">

・年月日表示(日本式 年・月・日)
display=date&dformat=YYMMDD

<img src="cgi-bin/Count.cgi?display=date&dformat=YYMMDD">

カウントデータのファイル
/var/lib/wwwcount/data/counter.dat


TOP