The first step is to open up each and every
file that has a .cgi extention and edit line number one of each script. Each of the
cgi scripts is written in perl 5. For your scripts to run they must know where perl 5 is
installed on your web server. The path to perl 5 is defined to a cgi script in the first
line of the file. In each of the cgi scripts the first line of code looks something like
this:
#!/usr/bin/perl
If the path to perl 5 on your web server is
different from /usr/bin/perl you must edit the first line of each cgi script to reflect
the correct path. If the path to perl 5 is the same no changes are necessary. If you do
not know the path to perl 5 ask the webmaster or system administrator at your server site.
Only one thing to configure here. Open
up stats.cgi in your favorite text editor and find the USER CONFIGURATION AREA at the top
of the script. There are 6 variables. Most are pretty self explanatory I hope.$domain =
"yourdomainname.com"; (your
domain name goes here)
$logfile =
"/full/path/to/your/logs"; (full
path to your REFERER logs)
$outputdir =
"/full/path/to/where/you/want/the/stats/"; (full path to the stats directory for the results)
$referaldepth = 10; (how many top refering sites do you want to count?
top 10, 25, ?)
$pagereferaldepth = 10; (how many pages do you want to count in the TOP and
LEAST hit pages)
$hurlingthreshold = 100; (this is the value you consider for password hurler
alerts)
The only 3 that might be a bit confusing
(the last 3) are $referaldepth, $pagereferaldepth, and $hurlingthreshold.
$referaldepth is simply how deep you
want to count and list the TOP refering sites. If you set this value to 10 (default)
then your stats will only show the TOP 10 REFERING SITES. If you set $referaldepth
to 25 then your stats will show the TOP 25 REFERING SITES.
$pagereferaldepth is similar but it affects
the TOP AND LEAST visited webpages within your site. Thus setting this variable to
16 (for example) would show you the TOP 16 visited pages and also the LEAST POPULAR 16
pages.
$hurlingthreshold is a value I would leave
alone. 100 is a good number for this variable. If your website is being
attacked by brute force password hurlers then their IP address will show up in your
logfile. You can then contact their ISP and get them in trouble, or just hack their
site or blow up their PC with a good ol' syn-flood.