W3C home > Mailing lists > Public > www-html@w3.org > July 1995

Re: counters

From: Terra Goodnight <terra@clark.net>
Date: Mon, 10 Jul 1995 15:53:01 -0400 (EDT)
To: WLemke8503@aol.com
Cc: www-html@www10.w3.org
Message-Id: <Pine.SOL.3.91.950710154418.25902A-100000@clark.net>
On Mon, 10 Jul 1995 WLemke8503@aol.com wrote:

> I would like to set up a counter to keep track of how many people have
> visited my home page.  I have seen others use this, and am wondering how it
> is done.  Can  you please let me know how to do this, or tell me where 
> I can find this information?

Find the logs directory for your web server (usually for NCSA it is 
/usr/local/etc/httpd/logs/)  in it, you should find a file called 
access_log which you can grep for the filename you wish to get access 
stats for.  For instance, if my files are all in the /terra directory at 

grep /terra /usr/local/etc/httpd/logs/access_log | more 

(pipe through more since there will be many screenfuls)


grep /terra /usr/local/etc/httpd/logs/access_log > filename 

(saves it as a file which is easier to dig through since the list is long).

usually the log file is massive and the grep will take a few minutes to 
complete, so if it seems like it's hanging, just wait a bit and you'll 
get your prompt back.

There are other CGI packages that will run and make a much 
nicer output display, but they get their information from that same 
logfile.  One that I use is Matt Kruse's access.pl at

Received on Tuesday, 11 July 1995 00:21:13 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 30 April 2020 16:20:15 UTC