NameVirtualHost * <VirtualHost *:80> DocumentRoot /var/www ServerName xight.org </VirtualHost> <VirtualHost *:80> DocumentRoot /home/yoshiki/public_html/chalow ServerName memo.xight.org ServerAlias memo CustomLog /var/log/apache/memo.access.log combined ErrorLog /var/log/apache/memo.error.log </VirtualHost>
# mv awstats.conf awstats.xight.conf
# cp awstats.xight.conf awstats.memo.conf
/etc/awstats/awstats.xight.conf
LogFile="/var/log/apache/access.log.enc" SiteDomain="xight.org"
/etc/awstats/awstats.memo.conf
LogFile="/var/log/apache/memo.access.log.enc" SiteDomain="memo.xight.org"
解析結果画面は
http://example.com/cgi-bin/awstats.pl?config=xight
http://example.com/cgi-bin/awstats.pl?config=memo
で確認できる.
- crontab
45 * * * * /home/yoshiki/bin/conv_weblog_to_utf8.pl < /var/log/apache/access.log > /var/log/apache/access.log.enc
45 * * * * /home/yoshiki/bin/conv_weblog_to_utf8.pl < /var/log/apache/memo.access.log > /var/log/apache/memo.access.log.enc
0 * * * * /usr/lib/cgi-bin/awstats.pl -config=xight -update > /dev/null 2>&1
0 * * * * /usr/lib/cgi-bin/awstats.pl -config=memo -update > /dev/null 2>&1
- Reference
バーチャルホストによる複数サイトの同時運用 (1/2)
http://www.atmarkit.co.jp/flinux/rensai/apache08/apache08a.html
バーチャルホストによる複数サイトの同時運用 (2/2)
http://www.atmarkit.co.jp/flinux/rensai/apache08/apache08b.html
AWStatsでのW3C拡張ログ形式の解析方法
http://shattered04.myftp.org/pc_31.html