Thursday, 11 December 2008

Install AWStats

My home web server is a very quiet corner of the Internet and the last thing it needs is web stats. It goes without saying that I decided to install some.

Gettingsudo apt-get install awstats
Configuration

Using your favourite editor, create a file/etc/awstats/awstats.local.conf.

HostAliases="localhost 127.0.0.1"
LogFile="/var/log/apache2/access.log"
LogFormat=1
DNSLookup=1
DirData="/var/cache/awstats/"
DirCgi="/cgi-bin"
DirIcons="/icon"
SiteDomain="prawn.mine.nu"
AllowToUpdateStatsFromBrowser=0
AllowFullYearView=3
SkipHosts="REGEX[^127\.0] REGEX[^192\.168\.]"

I have configured mine to ignore any traffic on my subnet using SkipHosts parameter and a simple regex.

Create a directory /var/cache/awstatsmkdir /var/cache/awstats
chmod 700 /var/cache/awstats
chown www-data:www-data /var/cache/awstats

Next Step is copying the awstats icons to the relevant apache directory.sudo cp -r /usr/share/awstats/icon /var/www/icon
Testing the stats updatesudo /usr/lib/cgi-bin/awstats.pl -config=local -updateThe -config= parameter is the middle bit of your config filename. In this instance, the -config=local instructs the program to read the file /etc/awstats/awstats.local.conf.

Now you should be able to view your stats. Point your favourite browser at http://your.host.name/cgi-bin/awstats.pl?config=local and enjoy.

Scheduling updates


Set up crontab to run an update as often a you think sensible.sudo crontab -uroot -e
#mine looks something like this:
#update at 3 am
* 3 * * * /usr/lib/cgi-bin/awstats.pl -config=local \
-update

To admire the full glory of awstats and the lack of traffic on my home web server, here it is...

Further reading

You could do worse than the awstats sourceforge page and here for configuration directives.

Wednesday, 10 December 2008

Deer santah

Oh Hai, santah! Can I has manbag?



kthxbai.

Code::Blocks

Ooh-err, missus.

I have been tinkering around with Code::Blocks which is a cross platform development tool. Embedded in its genes is the wxWidgets set of classes. I have only had a 24 hour tinker with it and, to be frank, have not coded in C++ for over four years - but it looks promising. My only gripe is the faffing about you have to do when converting from C++ string classes to wxString classes and vice versa.

It is early days yet and a more fully formed opinion will out in due course.

On the plus side it will work as an IDE with other idioms than the wx... family.

Lolcat 404

Oh Noes!

I have, despite my age and sensibilities, developed a rather weird fascination for the whole Lolcat meme. As a silent homage to all things Lolcat, I have created a 404 page in honour of the phenomenon. Point your bowser here for the full asinine horror and accept my apologies pro tempore. I'll get over it in the fullness of time.

If you want to see a demonstration of how the Internet could suck up one's time on a biblical scale, you could do worse than peruse the LOLCAT Bible project for a demonstration. I have not the words.

Update: It seems that teh Ceiling Cat has a Twitter account. Follow the tweets here.

AWStats

My home server is a very quiet corner of the Internet which is handy as it gave me the opportunity to install AWStats without upsetting anyone. If you have a prurient disposition, the stats can be viewed here. My first impressions are pretty favourable. I have configured it to ignore any visits via my own subnet so you will see how quiet it really is. Be that as it may, I have rather optimistically set it up to update every fifteen minutes so come back real soon, you hear? /tumbleweed

Install writeup to follow. Done.