Current Version: 1.4.2
Modified on: 10th January 2003
Topics:
Accessing Summarizer
Accessing the sumamrizer reports is simple, you need to just enter http://www.site-you-installed-in.com/dir-installed-in/summarizer.cgi
For RaQ3 & RaQ4 owners that have used the '.pkg' format to isntall the Summarizer script is the MAIN sites (home) stats directory. i.e. http://www.mainsite.com/stats/summarizer.cgi
Dont forget that the directory is normally password protected, so enter your normal username/password if you have password protection.
Requirements for Summarizer
Summarizer is written in perl, and has been test with perl 5. It may work on earlier versions but this has not been tested.
The following perl modules are required:
- strict - standard to perl - raq3/4 has by default
- CGI - standard to perl - raq3/4 has by default
- Fcntl - standard to perl - raq3/4 has by default
- optional: LWP::UserAgent - probably standard to most systems - raq3/4 has by default
PKGMasters version
The Webalizer version from PKGMaster.com seems to place the STATS in a special directory '/home/sites/*/users/stats/web', this is a NON-CGI enabled directory, and I recommend you do NOT attempt to install the CGI (summarizer.cgi) in this directory, but rather you create a directory in the ~admin users 'web' directory - i.e. '/home/sites/home/users/admin/web/summarizer' and place the summarizer.cgi and summarizer.ico files in there (as well as password protecting it.
Also you will need to alter the CGI script (see Configuration of 'summarizer.cgi').
A known 'good' configuration change for this situation is as follows: (you will need to edit summarizer.cgi for this)
my $httpd_inside_site_dir = q(users/stats);
my $webalizer_stats_dir = q(web);
Cobalt/Sun RaQ3 & RaQ4 - Minor Modification required
On the Cobalt/Sun RaQ3 & RaQ4, Front Page is typically installed, and Webalizer can cause problems accessing the 'stats' directory. This has been circumvented by a patch I wrote quite some time back FAQ/99 (UK2RaQ.com). Also the Webalizer version from PKGMaster.com does a similar alteration to webalizer as my patch does (my patch was out first - by months ;-P).
- 1.3 - PKGMaster.com's RaQ3 & RaQ4 Webalizer version 1.3 packages does NOT need the alteration, unless you have followed FAQ/99 and fixed it so it allows FrontPage to work.
- 2.x - PKGMaster.com's RaQ4 Webalizer version 2.x packages Requires the alteration.
- 2.x - FaQ/29 (UK2Raq.com)RaQ3 & RaQ4 Webalizer version 2.x packages Requires the alteration.
What happens when Webalizer is run every night is that the two above patches change the ownership of the stats directory to 'nobody', and you can not run a CGI script like 'Summarizer' as the user 'nobody'.
- PKGMaster.com's RaQ4 Webalizer version 2.x - The following alterations need to be made to the 'webalizer.pl' perl script:
pico -w /etc/cron.daily/webalizer.pl
Scroll down until you find these lines (near the end):
if (!-d $webpath . "/_vti_bin") {
$messages .= `echo "Frontpage NOT ENABLED on $webpath"`;
$messages .= `chown -R httpd:$name $thepath`;
} else {
$messages .= `echo "Frontpage ENABLED on $webpath"`;
$messages .= `chown -R nobody:$name $thepath`;
}
Now IMMEDIATLY after the above, insert these lines: - its probably best to paste these, due to the number of ( and ).
foreach (qw(/home/sites/home/web/stats/summarizer.cgi
/home/sites/home/web/stats/summarizer.ico)) {
chown ((getpwnam('admin'))[2], -1, $_)
if ((-e) and ((lstat($_))[4] ne (getpwnam('admin'))[2]));
}
- UK2Raq.com RaQ3 & RaQ4 Webalizer version 2.x - The following alterations need to be made to the 'webalizer2.pl' perl script:
pico -w /usr/bin/webalizer2.pl
Scroll down until you find these lines (near the end):
foreach (@stats_dir_contents_before) {
next if (/\/\.+$/);
push @stats_dir_contents, $_;
}
Now insert this ONE line before the line that says push
next if (/\/summarizer\./);
So it should look like this:
foreach (@stats_dir_contents_before) {
next if (/\/\.+$/);
next if (/\/summarizer\./);
push @stats_dir_contents, $_;
}
Now insert this ONE line before the line that says push
If webalizer has already run and altered the ownership of the summarizer.cgi file, you can correct this now quickly, so it will execute as it is supposed to do:
chown admin /home/sites/home/web/stats/summarizer.*
Configuration of 'summarizer.cgi'
Summarizer comes preconfigured for use on a Cobalt/Sun RaQ3 & RaQ4.
However there are some changes you may wish to make, so the FULL configuration is explained here for ALL server types (not just RaQ3/4)
The following variables can be found close to the top of the script, and are abe to be customised
my $auto_check_for_updates = q(yes);
my $allstats_username = q();
my $allstats_password = q();
my $months_to_show = 12;
my $webalizer_conf_file = q(/etc/webalizer.conf);
my $httpd_groups_dir = q(/home/sites);
my $httpd_inside_site_dir = q(web);
my $webalizer_stats_dir = q(stats);
my $webalizer_numbers_file = q(index.html);
my $re_cache_time = 3600;
my $summarizer_cache = qq($ENV{'DOCUMENT_ROOT'}/../summarizer.cache);
my $summarizer_cache_perms = 0600;
my $html_start_tag = q(<html>);
my $body_start_tag = q(<body>);
my $html_finish_tag = q(</body></html>);
my $title_bgcolor = q(c0c0c0);
Configuration by variable name