Deletions are marked like this. | Additions are marked like this. |
Line 16: | Line 16: |
=== 設定ファイル === | === awstats設定ファイル === |
Line 38: | Line 38: |
=== 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> }}} |
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を編集し、以下を修正。
LogFile=ログ・ファイルの場所
SiteDomain=サイトのドメイン
- DNSLookup=1にする
SkipHosts=適当に設定
※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>