I just spent some time working out how to produce multiple awstats reports for multiple virtual hosts. See here for step by step instructions.
Setting up awstats for multiple virtual host logs
I only just realized recently that my apache2 config was outputting logs for my main domain into access.log, and all other virtual hosts into other_vhosts_access.log. As a result, awstats was not picking up hits to the majority of my sites.
To set up awstats to produce stats for each of my stats was relatively easy:
- Config each virtual host in your apache2.conf to have it’s own CustomLog directive:
<code><br />
<VirtualHost *:80><br />
ServerAdmin example@example.com<br />
DocumentRoot /var/www/html/example<br />
ServerName www.example.com<br />
DirectoryIndex index.jsp index.html<br />
CustomLog /var/log/apache2/access_example.log combined<br />
</VirtualHost><br />
</code></p>
<li>Copy your /etc/awstats/awstats.conf to awstats_example.conf – one per each domain where example is the domain name
<li>Edit each awstats.conf and change the log entry to point to the log file you added in the apache2.conf above, change the DataDir to be /var/awstats/example, and SiteDomain to e.g. example.com
<li>Create new subdirs for each DataDir in /var/awstats
<li>Run the stats collection manually to check working:
<pre><code>
sudo /usr/bin/perl /usr/lib/cgi-bin/awstats.pl -update -config=example.com
</code> - Update your cron entry to schedule the log processing, e.g. in /etc/cron.d/awstats:
<code> 0,30 * * * * www-data [ -x /usr/lib/cgi-bin/awstats.pl -a -f /etc/awstats/awstats_example.com.conf -a -r /var/log/apache/access_example.log ] && /usr/lib/cgi-bin/awstats.pl -config=example.com -update >/dev/null </code>
- Add one line for each of the domains you need to collect log stats for. Done!
To access the stats for each of the domains, use the awstats config name passes as a param in the URL:
<code> http://www.example.com/awstats/awstats.pl?config=example.com </code>
Infoworld.com on the 15″ MacBook Pro: “quintessential commercial notebook is now even better”
Infoworld.com have a glowing report of the 2009 unibody 15″ MacBook Pro. Interestingly they point out that most typical PC laptops have a 2 year useful lifespan, whereas the MacBook Pros are good for 5 years before you even need to consider upgrading.
Sony Ericsson’s Google phone – one up on the iPhone?
Sony Ericsson’s Google phone demo shown in this video on Gizmodo is possibly the slickest UI I have seen yet on a mobile phone, possibly even more slick than the big-daddy of them all, the iPhone.