WWWSTAT is one of the easiest counting tools to use. Not only does it count all the hits listed in your log files, but it also has many different configurable options available from the command line. The options allow you to change the way the data is viewed, what is and is not allowed and a host of other such things.
Copy wwwstat-1.0.tar file to the directory above where you want to install wwwstat, cd to that directory, and type
tar -xvf wwwstat-1.0.tar
to create the directory. wwwstat-1.0 will contain the following:
Changes -- the list of known problems and version information
README -- A list of instructions and example command line options
country-codes -- a table of Internet domains and their country names
example.html -- an example of what wwwstat output should look like
old2newlog -- A tool for converting httpd 1.1 logs to 1.2 format
oldwwwstat -- wwwstat for old NCSA httpd 1.0 or 1.1 servers
wwwstat -- the main perl script
Delete the oldwwwstat script it is not needed.
rm oldwwwstat
3. Configure the wwwstat script to match the server configuration and default options desired for your site. You will probably need to change the following (with any text editor).
The following variables set in the first section of code: $OutputTitle # The output document's HTML Title.
$LastSummary # The URL of the previous summary period
$ServerHome # The server's default home page.
$countrycodefile # The location of the country-codes file.
$access_log # The location of your default server access log
$srm_conf # The location of your server configuration file
$mydom1 # Identify the last two components of your local
$mydom2 # hostname addresses for special treatment
Ex.
$OutputTitle = "WOW We Got This FAR Statistics for bcpub.com";
$LastSummary = "/www/htdocs/bcpub/wwwstat-1.0/last.html";
$ServerHome = "https://bcpub.com/index.html";
$countrycodefile = "/www/htdocs/bcpub/wwwstat-1.0/country-codes";
$access_log = '/www/logs/bcpub.com-access_log';
$srm_conf = '/www/conf/srm.conf';
$mydom1 = "bcpub.com";
$mydom2 = "dialup*.fwi.com";
The defaults for options that can be overridden by the command line: $LocalFullAddress # Show full address for hosts in my domain?
$OthersFullAddress # Show full address for hosts outside my domain?
$ShowUnresolved # Show all unresolved addresses?
4. Make sure the script is executable:
chmod 755 wwwstat
5. Thats it. Run it.
wwwstat > index.html