UvA FNWI UvA


 
  28 visitors in
May 2012
 
  last update
26 - 09 - 2004
 
 

 

Module mod_counter

This module is contained in the mod_counter.c file, and is compiled in by default in our httpd daemons. It provides an server side include environment variable containing the number of hits on a page. This variable is displayed using the following code:
    <!--#echo var="COUNTER"-->

The counters are reset each month. An example usage is as follows:

    <!--#config timefmt="%B %Y"--><!--#echo var="COUNTER"--> hits in 
    <!--#echo var="DATE_LOCAL"--><!--#config timefmt="%A, %d-%b-%y %T %Z"-->
This will display the following text:

28 hits in May 2012

Directives


Counter

Syntax: Counter on/off
Default: Counter Off
Context: server config
Status: Extension
Module: mod_counter

This allows or prevents Apache from incrementing the counter and making it available in a server side include environment variable.

CounterDBMFile

Syntax: CounterDBMFile filename
Context: server config
Status: Extension
Module: mod_counter

The CounterDBMFile directive sets the name of the DBM file to which the server will log the counts of incoming requests. Filename is a filename relative to the ServerRoot.

CounterIgnore

Syntax: CounterIgnore string string ...
Context: directory, .htaccess
Status: Extension
Module: mod_counter

The CounterIgnore directive adds to the list of hosts to ignore when incrementing the counter. Requests from hosts listed in the CounterIgnore list will not cause the counter to be incremented. Example:

CounterIgnore .science.uva.nl
This avoids incrementing the counter on requests from within the FNWI domain.