The default installation of Urchin is configured for your main host and any subhosts listed in your httpd.conf file (whether or not they have separate log files). There are, however, several changes you can make to the default configuration to suit your personal needs.

Urchin Configuration File

The primary configuration file for Urchin is in your ~/usr/local/urchin/ directory and is named config. The format of the config file is similar to your apache httpd.conf file, and contains instructions on what the listed directives mean. You can use the urchin configuration file to set up automatic logfile rotation, DNS resolution , and reporting styles. The file also contains important license information.

NOTE: Do not edit the license information in your urchin configuration file. If the license information is changed, it can cause the program to stop functioning

The LogDestiny directive is used to determine whether Urchin should archive, delete, or leave logfiles alone. If you use Urchin to delete your web log files instead of using vnukelog, your email and ftp log file (~/var/log/messages) will not get deleted. You will need to create a separate cron command to delete your messages file. An example of a cron entry to do that is:

51 23 * * 0 /bin/cat /dev/null > $HOME/var/log/messages

The second section of the urchin configuration file contains the individual report settings. There must be a Report configured for each domain you want Urchin reporting done. The default install sets up a report for each of the hosts listed in your httpd.conf file, and configures the reports to be stored in the urchin directory off the host's DocumentRoot directory.

The following is an example of what a Report configuration should look like:

<Report>
ReportName: YOUR-DOMAIN.NAME
ReportDirectory: /usr/local/LOGIN/usr/local/etc/httpd/vhosts/YOUR-DOMAIN.NAME/htdocs/urchin/
TransferLog: /usr/local/LOGIN/usr/local/etc/httpd/vhosts/YOUR-DOMAIN.NAME/logs/access_log
ErrorLog: /usr/local/LOGIN/usr/local/etc/httpd/vhosts/YOUR-DOMAIN.NAME/logs/error_log
</Report>

NOTE: Each directive should be on a single line in the config file.

NOTE: Urchin requires CGI execution to be enabled in the report directory. If you don't want your subhosts to be able to run their own CGIs, you may want to locate their report directory outside their Document Root so they can not add scripts to that directory

Urchin Settings in the httpd.conf file

The default installation of Urchin will add Directory configurations for the locations where urchin reports will be located. If you make changes to any reports in the urchin configuration file, you need to make sure that the appropriate changes are also made in the httpd.conf file also.

Urchin requires that CGI execution be enabled in the directories where reports are located, and that symbolic links are followed by the web server so that the program files only have to be in one place on your virtual server. These settings are configured inside specific Directory configuration directives in the httpd.conf file. The Directory settings should look something like this:

<Directory /usr/local/etc/httpd/htdocs/urchin/YOUR-DOMAIN.NAME>
AddHandler cgi-script .cgi
DirectoryIndex index.html index.cgi
Options FollowSymLinks ExecCGI</Directory>

The only part of the directory settings that you would normally need to change is the path indicated in the opening tag. If you change any of the other settings, it is possible that Urchin will not work properly.

Please note: the information on this page applies to ITS web hosting plans. It may or may not apply to other environments. If you are looking for a feature described here, or better support from your hosting provider, please consider hosting your site with ITS!

1555 N Naperville/Wheaton Road, Suite 107
Naperville, IL 60563
phone 630.420.2550
fax 630.420.2771