w3.Z-ADD.co.uk      Design and Sell Merchandise Online for Free

Installing AWStats (Part 2)


Top level DSVR


Author:   Publishing date: 26.06.2003 23:45

This article covers the first of two main changes to the AWStats configuration created in the last article. In this, brief, article the scripts are moved out of the cgi-bin directory (as they are only being run directly by a cron job) and into a non-web-accessible directory.

The first step in moving the scripts away from the cgi-bin directory is to create a new directory for them. This must be in the (admin owned) /usr/local/ file system space, so I'm using "/usr/local/etc/awstats" - along the same lines as the Webalizer configuration files. Log in, as admin, to a shell prompt (via SSH as Telnet is, rightly, being withdrawn) and create the directory.

Now copy the files installed in the previous article with:

mv /www/vhtdocs/sitedir/cgi-bin/lang .

mv /www/vhtdocs/sitedir/cgi-bin/lib .

mv /www/vhtdocs/sitedir/cgi-bin/plugins .

mv /www/vhtdocs/sitedir/cgi-bin/awstats.pl .

mv /www/vhtdocs/sitedir/cgi-bin/awstats.sh .

mv /www/vhtdocs/sitedir/cgi-bin/awstats.sitename.conf .

mv /www/vhtdocs/sitedir/cgi-bin/awstats_buildstaticpages.pl .

All of the file permissions should remain intact, but you will have to edit "awstats.sh" and update the paths to the to the cgi-bin directory so that they point to the new directory (on the "cd" and "awstats_buildstaticpages.pl" lines). You also need to edit your crontab to point to the new location of the awstats.sh file (with "crontab -e").

You can test your new configuration by running the shell script manually, e.g. from the shell: "/usr/local/etc/awstats/awstats.sh". If that runs and the statistics web pages are updated, you have moved the scripts correctly.

The next article will, finally, document (the non-trivial) installation of the Perl modules necessary to run Geo::IPfree as a non-root user.



The copyright of some of the images that are used on this site is held by 3rd parties. The images are used for review purposes under the Fair Use / Fair Dealing provisions of copyright law. If any copyright holder objects to such use, please use the contact address below.