options.html Contents netmasks.html


Configuration file (all platforms)

The count.cfg file contains the runtime configuration information for the Count program. The file consists of sections and parameters. A section begins with the name of the section in square brackets and continues until the next section begins. The sections contain parameters of the form keyword=value or just keyword one in each line. The file is line-based, that is, each newline-terminated line represents either a comment, a section name or a parameter. The section and the parameter names are not case sensitive. A sample configuration file is shown below:

###-----------------------------------------------------------------------
### configuration file for Count 2.6
### Automatically generated from user input by the script Gen-conf
### created on: Sat Aug 21 10:22:52 EDT 1999
### Note: Configuration file format for Count 2.5 is different than
###       older versions. -- mm
### The format of the file is described below:
###   - Any line starts with # or ; is considered comment and ignored.
###   - A section in the file is inside left and right bracket.
###   - Each section has parameters below the section.
###
### Please read the Configuration section in the counter webpage for details.
### The official counter homepage is at URL:
###     http://www.fccc.edu/users/muquit/Count.html
###----------------------------------------------------------------------

[version]
   2.6 

##-- options section
; If auto_file_creation=Yes, then the users can create data files. It IS
;  dangerous to set this option to Yes.
#
; strict_mode=Yes or No. Run the program in strict mode or not. It's a good
;  idea to set this option to Yes.
#
; allow_rgb_database=Yes or No. Convenient to use because colorname e.g., red,
;  gold etc can be used instead of rgb components of the color, however it is
;  very inefficient to lookup. If your site is busy, set this option to No.
#
; count_reload=Yes or No. It is a good idea to set this option to No. But
;  you've to set this option to Yes if you are running a proxy server.
;  Normally set this option to Yes.
#
; log_error_messages=Yes or No. If your site is extremely busy and if the
;  counter generates lots of logs, set this option to No. Normally set this
;  option to Yes.
#
; log_visitor_info=Yes or No. If you want to information about visitor, specify
; Yes. The path of the visitor log file is determined at compile time
;
#
; log_rotation_interval=seconds. You can rotate the visitor log file if 
; you wish. You need to enter the interval in seconds. For example if you 
; want to rotate the visitor log ; file in every 30 days, the rotation 
; interval will be 30*24*60*60 = 2592000. The rotating visitor log file 
; names  will be something like ; visitor.log_933120000, visitor.log_935712000.
; If you do not want to rotate visitor log, enter 0 for the interval.
#
; show_error_messages_to_browsers=Yes or No. Set this option to No if you're
;  concerned with privacy and you're sure that the counter works perfectly.
;  If you set this option to No, you will not see error messages.

[options]
  auto_file_creation=No
  strict_mode=Yes
  allow_rgb_database=Yes
  count_reload=No
  log_error_messages=Yes
  log_visitor_info=Yes
  log_rotation_interval=2592000
  show_error_messages_to_browsers=Yes


; You can specify IP address of the hosts you want to ignore from counting.
; netmasks can be used to ignore a entire network or a specific range of
; hosts in the network. Read the counter documentation to know about
; netmasks. Wild card can be used as well. one item per line.
;
[ignore IPs]
  0.0.0.0

;
; All possible names and IP addresses by which your host can be referred.
; These hosts can access the counter remotely or locally. Host running
; the http server must exist here. Wild card can be used. one item per line.
;
[authorized]
  www.muquit.com
  www
  0.0.0.0
  localhost

The config file is parsed each time the counter program gets accessed. Therefore, smaller the file, the better the performance. If you have thousands of entries in [ignore IPs] or [authorized] section, you'll notice performance degradation. Try using wild cards if possible.

As of version Count version 2.4, referrer host names will be looked up in DNS if the program is compiled with the USE_DNS macro defined in src/Makefile. This allows you to list wild-card IP address ranges in [authorized] section of the config file. This feature can reduce a 200 line [authorized] section down to a single line. Without USE_DNS, the host name as sent by the browser's HTTP_REFERER header must be listed EXACTLY.

You can take an existing config file and modify it or use the program Gen-conf to create one. Try to keep comments in the file to a minimum. Note, [ignore ips] section only contains IP addresses, IP address and netmask or wild carded IP addresses. Never use host names in this section, they will be ignored. Netmasks can be used to get finer control to ignore a very specific range of hosts. Read the section How to use netmasks at [ignore IPs] section if you have specific need to ignore a range of hosts. Otherwise, use wild cards and be happy. The [authorized] section contains all the names and IP addresses of the hosts allowed to execute the counter remotely or locally. The name and IP of the host running the web server must be at this section.


options.html Contents netmasks.html