Thursday 27 August 2009

Trying site log analysers

This morning I tried setting up awstats on my Ubuntu Virtual Machine to see if I could get it working, and what sort of info it would give me.

Getting it installed wasn't too hard, just had to follow the instructions. The only problem I had was that first of all the icons/images weren't showing up. This was because the default value for the icons directory in the .conf file is a different value to the one the instructions say to add to your apache config. So updating the .conf file with the correct value for the icons directory (DirIcons="/awstatsicons" instead of DirIcons="/icon") fixed that.

The main thing I wanted to check was whether awstats could be used for multiple domains/websites. Before I installed it, I thought that I would need to install it in each directory that contained a website. But I was totally wrong, basically you create a different .conf file for each of your websites, and then in your .conf files you specify the log file for that website/domain (amongst many other options).

There seems to be two ways of accessing awstats - you can generate the reports at the command line if you have SSH/command line access, or otherwise you can place the awstats folder in a web accessible location, and then load up the perl script through your browser, specifying the .conf file for the site you want stats for in the url query string.

awstats gave me quite a lot of info, importantly including a list of pages/requests generating a 404 error, so you can see where you're getting 404s and fix it. It didn't give a list of what requests generated a 301 HTTP status code though, so I asked on the awstats forums if this information was possible to get.

After lunch I went on Animal Crossing for a bit, then I went out on a walk with Rad and Lad.

When we got back from the walk I tried installing Webalizer to see if that would give a list of pages/requests generating 404s and 301s. When trying to ./configure I got an error that libgd wasn't installed. I had read earlier that Webalizer required the development versions of various packages, so I tried sudo apt-get install libgd-devel, however this said that no such package existed.

So I googled for libgd-devel, and found the libgd website, which said you had to checkout the source from CVS and compile the devel version yourself. So I tried the command on their website to login to CVS, but I didn't have CVS installed. So I installed CVS, then tried the command again, but got a message that the user didn't exist. I couldn't see any list of users you can login with or any other way to download the source on their website.

So I gave up trying to build libgd-devel from source, and tried searching the synaptic package manager for libgd. There were loads of results, but I eventually found one called libgd2-xmp-dev which had the correct description (GD Graphics Library Version 2 Development Version), so I installed that.

After getting that installed I could finally install Webalizer. I ran Webalizer, and couldn't see any way to get a list of pages/requests returning 404, let alone a list of pages/requests returning 301. The other stats about page requests etc. I'm not too bothered about as I also plan on running Google Analytics, so it's mainly 301s and 404s I wanted the log analysers for.

After dinner I went on Animal Crossing for a bit, then I went on Wii Sports Resort, then went in the garden and took a few photos while topping up the pond with the hose.

The rest of the evening I was trying to get my photo website working properly. I was having trouble with an SQL query, so eventually I posted it to the sitepoint forums to try and get some help with it (it seems that quite often threads at the official mysql forums go unanswered).

Food
Breakfast: Toasted tea cake with Flora buttery; cup o' tea.
Lunch: Herby chicken slices with mayonnaise, sliced raddish and lettuce sandwich; 2x plums; slice of date cake with toffee & walnut sauce; Tesco fake caramel Rocky; cup o' tea.
Dinner: Spaghetti; Bacon sauce stuff; Ground black pepper. Pudding was ice cream and strawberries. Coffee; Piece of Sainsbury's Caramel Chocolate; Piece of Sainsbury's Turkish Delight Chocolate; Piece of Sainsbury's Truffle Chocolate.
Supper: Slice of date cake with toffee & walnut sauce; coffee.

No comments: