AWStats Referrers Add-on Installation


 

The main features of the program, including a screen shot are presented in our main page about our AWStats Referrers Add-on.

Our program is written in Perl. Perl is already installed on your system, as it is necessary to run AWStats.

Our program should work on several operating systems, but, so far, we limited the tests to Linux and Windows servers.

License terms

The AWStats Referrers Add-on is available at no charge from InternetOfficer SPRL. You may not redistribute this program. You may modify it for your personal use, but you may not redistribute these modified versions.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Download

Please read the license terms above before you download the software. If you do not agree with these terms, do not download or use the software.

If you agree with these terms, you may download version 1.06 of the software to your personal computer running Windows (Download Here) or to your Linux workstation (Download Here).

Referrers must be enabled in your browser to download our program.

Standard Installation (AWStats as a CGI)

If you use AWStats as a CGI, upload our downloaded file to the same directory as awstats.pl on your web server. Our program can be installed and run with this command :
http://www.my-site.com/awstats/cgi-bin/add-on.pl?config=my-site.com
where you replace my-site.com by the name of your site exactly as you did it for AWStats.

FTP upload must be performed in ASCII mode. Most FTP clients will do that automatically.

Standard Installation (AWStats with static pages)

If you generate the AWStats reports as static pages, copy our downloaded file to the same directory as awstats.pl. Before you run the program, configure 4 variables to meet the specifics of your installation.

Program lines 42 to 47 (as downloaded) :
#
$awstats_dir = ‘.’ ;
$url_awstats = ” ;
$reports_dir = ‘.’ ;
$url_addon = ‘http://www.my-domain.com/my-directory/add-on.html’ ;
#

$awstats_dir is the directory where the awstats.pl file is installed. Do not end this directory name by a slash (/) or backslash (\).

$url_awstats is the URL (starting with http://) of your AWStats main page.

$reports_dir is the directory where the add-on reports will be created. Do not end this directory name by a slash (/) or backslash (\).

$url_addon is the URL (starting with http://) of your Referrers Add-on main page. This URL must point to the add-on.html file in the $reports_dir directory.

Program lines 42 to 47 (typical example for static pages) :
#
$awstats_dir = ‘C:\awstats\cgi-bin’ ;
$url_awstats = ‘http://www.my-site.com/stats/awstats.html’ ;
$reports_dir = ‘C:\awstats-add-on\reports’ ;
$url_addon = ‘http://www.my-site.com/awstats-add-on/add-on.html’ ;
#

After these variables have been properly defined, you can run our program from the command line. For example, in a DOS box, this will look like this :
C:\awstats\cgi-bin>add-on.pl config=my-site.com output=static year=2006 month=04
where you replace my-site.com by the name of your site exactly as you did it for AWStats.

Advanced Technical Details

The language of the reports can be selected with the lang parameter in the URL or command line. At this time, the valid values are en (English), de (German), es (Spanish), fr (French) and nl (Dutch).

The month and year parameters in the URL or command line allow to generate reports for the passed months. Months should be written as 01, 02,… 12 and years as 2006, 2005, 2004,…

If the name of your AWStats program has been changed, the $awstats_program variable allows you to specify the appropriate file name.

If the $our_extra_section variable has the value ‘disallowed’, our add-on will not try to install an extra section in AWStats configuration file. If this option is selected, search engines domains will not be analyzed.

Search engines domains will not be analyzed either, if this program is installed with AWStats 6.1 or older.

3 Responses to “AWStats Referrers Add-on Installation”

  1. Bryan says:

    I use the CGI method but whenever I try to run the add-on I am told it could not find my configuration file. Awstats itself runs fine. Obviously I am missing something pretty simple but I cannot find it. The config files are located with the script.

    Question moved to our AWStats forum: config file not found.

  2. Mario Biron says:

    Hello!
    I canot run this addon. For some reason, it says that it cannot find the config file. (like previous post). And like him, my awstats.pl script runs fine.
    However, I am not running Awstats on the real webserver: I am using it in a another server, inside our lan. I import the live access logs to that server, and generate the stats by telling awstats.conf to look for those files.
    I use that server’s webserver to report using the cgi.
    Another thing: I do not have a special “config” file since it runs only for one website. I use the default awstats conf file, located in /etc/awstats. It is /etc/awstats/awstats.conf.
    I call the program this way:
    /usr/lib/cgi-bin/awstats.pl -config=unibroue.com -update -showsteps -showcorrupted -showdropped
    Finally, here is an example of a database file format syntax generated by my copy of awstats:
    /var/awstats/database/awstats012009.txt

    When I browsed the code for the addon, I saw that it looks for the config and tries to load various files with it (especially the configuration and database files) using a syntax that looks like ‘ “.” .&config. “.conf” ‘
    This means that, in my case, with no special version of the configuration file, only the default, it won’t work because this ends up trying to load a file named “awstats..conf” for example.
    I tried changing it to remove all the ‘ “.” .&congig ‘ parts, leaving only the extensions “.conf” and “.txt” so it could see and load my conf file and databases. It partly worked as it saw my configuration file but now it’s reporting that AWStats has not yet collected data. From that point, I don’t know so I’m turning over to you for advice!
    thanks!! :)

  3. Mario Biron says:

    Ok, forget my previous comment: I hacked the code a bit more and was able to completely remove the (config) option out of it. It runs fine now for me.


 

Leave a Reply