Information and Links

Join the fray by commenting, tracking what others have to say, or linking to it from your blog.


Other Posts

Adding access_log reporting to Urchin

Posted by plattapuss on February 9th, 2007

If you run Urchin locally on your machine, you might have noticed that access_logs are turned off by default, while error_log's are turned on by default. Turning access logs on is easy but there is a little trick.

First off, I have my Urchin installed in /usr/local/. The conf files for the Urchin webserver are in /usr/local/urchin/var/urchinwebd.conf. But that is not the file that you want to modify. You will need to make the changes in /usr/local/urchin/var/urchinwebd.conf.template. Otherwise, any change you make will be over written when you restart Urchin with /etc/init.d/urchin restart.

To turn access logs on, simply change this:

CODE:
  1. # Uncomment the following lines to turn on access logging
  2. # LogFormat "%h %v %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
  3. # TransferLog var/access.log
  4. ErrorLog var/error.log

to this:

CODE:
  1. # Uncomment the following lines to turn on access logging
  2. LogFormat "%h %v %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
  3. TransferLog var/access.log
  4. ErrorLog var/error.log

Then simply restart Urchin. There is no need to create the access_log on your own, as Urchin will automatically create the file. Though you might be smart to add log rotating for this file if you have a lot of people accessing Urchin on your server.



Reader Comments

Sorry, comments are closed.