Locked History Actions

awstats

awstats

インストールと設定

CentOS6.2の場合

インストール

yumでインストールする。

yum install awstats

awstats設定ファイル

設定ファイルは/etc/awstatsディレクトリにある。

# ls /etc/awstats
awstats.localhost.localdomain.conf awstats........conf
awstats.model.conf

このうちのawstats.model.confをコピーし、awstats.www.example.com.confを作成する(www.example.comの場合)。 複数サイトの場合は、同様にしてconfファイルを作成する。 作成し終わったら余計なconfファイルは名前を変更するか削除する。

awstats.www.example.com.confを編集し、以下を修正。

※apacheのログ・ファイルはcombinedにしておくこと。

apache設定

<VirtualHost *:80>
  ServerName analy.example.com
  ServerAdmin info@example.com
  DocumentRoot /usr/share/awstats/wwwroot
  ScriptAlias /cgi-bin/ "/usr/share/awstats/wwwroot/cgi-bin/"
  ErrorLog logs/analy.example.com-error_log
  CustomLog logs/analy.example.com-access_log combined

  <Directory "/usr/share/awstats/wwwroot">
    Options ExecCGI Indexes FollowSymlinks
    AllowOverride All
    ...その他の許可設定
  </Directory>

  <Directory "/usr/share/awstats/wwwroot/cgi-bin">
    Options ExecCGI IncludesNoexec
    AllowOverride All
    ...その他の許可設定
  </Directory>

</VirtualHost>

アクセス

ブラウザで

http://analy.example.com/cgi-bin/awstats.pl?config=www.example.com

などと指定。