www.Michael-Forman.com

Mason with Apache 2, mod_perl 2, mod_deflate, and AWStats HOWTO>>  Click to open

$Id: mason.html,v 1.2 2003/12/27 18:11:35 forman Exp forman $

This is a concise guide on how to install Mason with Apache 2, mod_perl 2, mod_deflate, and AWStats. It is assumed that the reader is relatively skilled in GNU/Linux and Unix and has the ability to solve problems independently that are not covered in this document.


Preparation

Create a directory in which to download and unarchive all the source code.
Download the latest version of Apache 2, mod_perl 2, Mason, and AWStats.
Perl 5.8.0 must be installed without exception.
Commands that need to be run as root are prefixed with the sudo command.

It should be noted that mod_perl 2 is currently in development and should not be used in a production environment.


Install Apache 2

Get the latest Apache 2 source from http://httpd.apache.org/download.cgi.
Unarchive the file and cd into the root httpd directory.
Configure, build, and install Apache 2.

Note that all modules are being built and mod_deflate is enabled.
./configure --with-mpm=worker --enable-modules=all --enable-mods-shared=all --enable-deflate
make
sudo make install
Apache 2 will install by default into /usr/local/apache2.
If there are problems compiling Apache 2, resolve them before continuing.

Install mod_perl 2

Get the latest mod_perl 2 source from http://perl.apache.org/download/index.html.
Unarchive the file and cd into the root mod_perl directory.
Configure, build, test, and install mod_perl 2.
perl Makefile.PL MP_APXS=/usr/local/apache2/bin/apxs
make
make test
sudo make install
ls -l /usr/local/apache2/modules/mod_perl.so
The target will be installed as /usr/local/apache2/modules/mod_perl.so. Verify its existence and time stamp.
If there are problems compiling mod_perl 2, resolve them before continuing.

To enable mod_perl add the following lines to the /usr/local/apache2/conf/httpd.conf file.
LoadModule perl_module modules/mod_perl.so
PerlRequire "/usr/local/apache2/conf/startup.pl"
Create the startup.pl script.
use Apache2 ();
use lib qw(/usr/local/apache2/perl);
use Apache::compat ();
use ModPerl::Util (); #for CORE::GLOBAL::exit
use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::RequestUtil ();
use Apache::Server ();
use Apache::ServerUtil ();
use Apache::Connection ();
use Apache::Log ();
use Apache::Session ();
use CGI ();
use CGI::Cookie ();
use APR::Table ();
use ModPerl::Registry ();
use Apache::Const -compile => ':common';
use APR::Const -compile => ':common';

1;
Start the server to see if things are working correctly.
sudo /usr/local/apache2/bin/apachectl restart
If there are problems starting Apache 2 with mod_perl 2, resolve them before continuing.


Install Mason

Get the latest Mason source from http://masonhq.com/code/download/.
Unarchive the file and cd into the root Mason directory.
Configure, build, and install Mason, using perl to install any reported missing modules.
Create the Mason cache directory in the Apache 2 root directory.
perl Makefile.PL
make
sudo make install
There are certain to be missing modules reported by the perl Makefile.PL command.
Before running make, install them using an interactive perl CPAN shell.
There were two modules, Apache::Request and Apache::Filter, that I could not install due to incompatibility with mod_perl 2.
This was not a problem.
sudo perl -MCPAN -e shell
...
cpan> install Apache::Filter
...
After compilation and installation of the Mason modules, create the Mason cache directory.
sudo mkdir /usr/local/apache2/mason
sudo chown wwwrun.nogroup /usr/local/apache2/mason
The cache directory must be owned by the user that runs httpd. For my flavor of GNU/Linux it is wwwrun.nogroup.


Configure Apache 2 for Mason

To configure Apache 2 to call Mason, add the following lines to the httpd.conf file.
PerlModule Apache2
PerlModule Apache::compat
PerlSetVar MasonArgsMethod CGI

PerlModule HTML::Mason::ApacheHandler

<FilesMatch "\.html$">
   SetHandler perl-script
   PerlHandler HTML::Mason::ApacheHandler
</FilesMatch>
Test the setup by watching the Apache error_log file, restarting Apache, and loading a test file with inline perl code.

Watch the log file. Errors with the existance or permissions of the cache directory will appear here.
tail -f /usr/local/apache2/logs/error_log
Restart the server from another console or terminal.
sudo /usr/local/apache2/bin/apachectl restart
Use a browser to load a file with inline perl code such as the one below.
<html>
<head><title>Mason Test</title></head>
<body>
1 + 1 = <% 1 + 1 %>
</body>
If there are problems starting Apache 2 with Mason or loading html files with inline perl, resolve them before continuing.
This concludes the installation of Mason with Apache 2 and mod_perl 2.


Configure Apache 2 for mod_deflate

Enabling mod_deflate to compress outgoing text files can be done by adding the follwing lines to the httpd.conf file.
More information on mod_deflate and its configuration can be found here.
<Location />
  # Insert filter
  SetOutputFilter DEFLATE

  # Netscape 4.x has some problems...
  BrowserMatch ^Mozilla/4 gzip-only-text/html

  # Netscape 4.06-4.08 have some more problems
  BrowserMatch ^Mozilla/4\.0[678] no-gzip

  # MSIE masquerades as Netscape, but it is fine
  # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

  # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
  # the above regex won't work. You can use the following
  # workaround to get the desired effect:
  BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

  # Don't compress images
    SetEnvIfNoCase Request_URI \    
      \.(?:gif|jpe?g|png)$ no-gzip dont-vary

  # Make sure proxies don't deliver the wrong content
  Header append Vary User-Agent env=!dont-vary
<Location>

DeflateFilterNote ratio
DeflateCompressionLevel 6
Compression information is added to the access log by placing the ratio in parenthesis at the end of the standard NCSA combined-format line.
To do this, add the following line to the httpd.conf file.
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" (%{ratio}n)" combineddeflate
Instruct Apache to use the new log format by changing the standard log line to the following.
CustomLog    /usr/local/apache2/logs/access.log combineddeflate


Configure AWStats for mod_deflate

Install AWStats. It is a relatively simple process, so the details are omitted.

Configure AWStats to read the modified log format and report statistics on the compression information provided by mod_deflate. Replace the default lines with the following lines in the awstats.conf file.
LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot %deflateratio"
Add the letter C to the end of the ShowFileTypesStats variable to enable reporting on compression.
# Show file types chart.
# Default: HB, Possible codes: HBC
ShowFileTypesStats=HBC
To generate the output html files for AWStats, use the following shell script.
#!/bin/sh

cd /usr/local/apache2/htdocs/information/awstats

AWSTATS="../../../cgi-bin/awstats.pl"
HOST="www.Michael-Forman.com"

$AWSTATS -config=$HOST -update

$AWSTATS -config=$HOST -output -staticlinks > index.html

$AWSTATS -config=$HOST -output=alldomains -staticlinks > awstats.$HOST.alldomains.html
$AWSTATS -config=$HOST -output=allhosts -staticlinks > awstats.$HOST.allhosts.html
$AWSTATS -config=$HOST -output=lasthosts -staticlinks > awstats.$HOST.lasthosts.html
$AWSTATS -config=$HOST -output=unknownip -staticlinks > awstats.$HOST.unknownip.html
$AWSTATS -config=$HOST -output=alllogins -staticlinks > awstats.$HOST.alllogins.html
$AWSTATS -config=$HOST -output=lastlogins -staticlinks > awstats.$HOST.lastlogins.html
$AWSTATS -config=$HOST -output=allrobots -staticlinks > awstats.$HOST.allrobots.html
$AWSTATS -config=$HOST -output=lastrobots -staticlinks > awstats.$HOST.lastrobots.html
$AWSTATS -config=$HOST -output=urldetail -staticlinks > awstats.$HOST.urldetail.html
$AWSTATS -config=$HOST -output=urlentry -staticlinks > awstats.$HOST.urlentry.html
$AWSTATS -config=$HOST -output=urlexit -staticlinks > awstats.$HOST.urlexit.html
$AWSTATS -config=$HOST -output=browserdetail -staticlinks > awstats.$HOST.browserdetail.html
$AWSTATS -config=$HOST -output=osdetail -staticlinks > awstats.$HOST.osdetail.html
$AWSTATS -config=$HOST -output=unknownbrowsers -staticlinks > awstats.$HOST.unknownbrowsers.html
$AWSTATS -config=$HOST -output=unknownos -staticlinks > awstats.$HOST.unknownos.html
$AWSTATS -config=$HOST -output=refererse -staticlinks > awstats.$HOST.refererse.html
$AWSTATS -config=$HOST -output=refererpages -staticlinks > awstats.$HOST.refererpages.html
$AWSTATS -config=$HOST -output=keyphrases -staticlinks > awstats.$HOST.keyphrases.html
$AWSTATS -config=$HOST -output=keywords -staticlinks > awstats.$HOST.keywords.html
$AWSTATS -config=$HOST -output=errors404 -staticlinks > awstats.$HOST.errors404.html
Congratulations. You have installed and configured Apache 2 with mod_perl 2, mod_deflate, and AWStats.

If you have suggestions for improving this document, please contact me.

 

httpd.conf File

Included below is the httpd.conf file for my website. Sections of interest have been highlighted to show where one should insert the code mentioned in this HOWTO file.
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs-2.0/> for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.  
#
# The configuration directives are grouped into three basic sections:
#  1. Directives that control the operation of the Apache server process as a
#     whole (the 'global environment').
#  2. Directives that define the parameters of the 'main' or 'default' server,
#     which responds to requests that aren't handled by a virtual host.
#     These directives also provide default values for the settings
#     of all virtual hosts.
#  3. Settings for virtual hosts, which allow Web requests to be sent to
#     different IP addresses or hostnames and have them handled by the
#     same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "/usr/local/apache2" will be interpreted by the
# server as "/usr/local/apache2/logs/foo.log".
#

### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation (available
# at <URL:http://httpd.apache.org/docs-2.0/mod/mpm_common.html#lockfile>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "/usr/local/apache2"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
<IfModule !mpm_winnt.c>
<IfModule !mpm_netware.c>
#LockFile logs/accept.lock
</IfModule>
</IfModule>

#
# ScoreBoardFile: File used to store internal server process information.
# If unspecified (the default), the scoreboard will be stored in an
# anonymous shared memory segment, and will be unavailable to third-party
# applications.
# If specified, ensure that no two invocations of Apache share the same
# scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.
#
<IfModule !mpm_netware.c>
<IfModule !perchild.c>
#ScoreBoardFile logs/apache_runtime_status
</IfModule>
</IfModule>


#
# PidFile: The file in which the server should record its process
# identification number when it starts.
#
<IfModule !mpm_netware.c>
PidFile logs/httpd.pid
</IfModule>

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

##
## Server-Pool Size Regulation (MPM specific)
## 

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers         5
MinSpareServers      5
MaxSpareServers     10
MaxClients         150
MaxRequestsPerChild  0
</IfModule>

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75 
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>

# perchild MPM
# NumServers: constant number of server processes
# StartThreads: initial number of worker threads in each server process
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# MaxThreadsPerChild: maximum number of worker threads in each server process
# MaxRequestsPerChild: maximum number of connections per server process
<IfModule perchild.c>
NumServers           5
StartThreads         5
MinSpareThreads      5
MaxSpareThreads     10
MaxThreadsPerChild  20
MaxRequestsPerChild  0
</IfModule>

# WinNT MPM
# ThreadsPerChild: constant number of worker threads in the server process
# MaxRequestsPerChild: maximum  number of requests a server process serves
<IfModule mpm_winnt.c>
ThreadsPerChild 250
MaxRequestsPerChild  0
</IfModule>

# BeOS MPM
# StartThreads: how many threads do we initially spawn?
# MaxClients:   max number of threads we can have (1 thread == 1 client)
# MaxRequestsPerThread: maximum number of requests each thread will process
<IfModule beos.c>
StartThreads               10
MaxClients                 50
MaxRequestsPerThread       10000
</IfModule>    

# NetWare MPM
# ThreadStackSize: Stack size allocated for each worker thread
# StartThreads: Number of worker threads launched at server startup
# MinSpareThreads: Minimum number of idle threads, to handle request spikes
# MaxSpareThreads: Maximum number of idle threads
# MaxThreads: Maximum number of worker threads alive at the same time
# MaxRequestsPerChild: Maximum  number of requests a thread serves. It is 
#                      recommended that the default value of 0 be set for this
#                      directive on NetWare.  This will allow the thread to 
#                      continue to service requests indefinitely.                          
<IfModule mpm_netware.c>
ThreadStackSize      65536
StartThreads           250
MinSpareThreads         25
MaxSpareThreads        250
MaxThreads            1000
MaxRequestsPerChild      0
</IfModule>

# OS/2 MPM
# StartServers: Number of server processes to maintain
# MinSpareThreads: Minimum number of idle threads per process, 
#                  to handle request spikes
# MaxSpareThreads: Maximum number of idle threads per process
# MaxRequestsPerChild: Maximum number of connections per server process
<IfModule mpmt_os2.c>
StartServers           2
MinSpareThreads        5
MaxSpareThreads       10
MaxRequestsPerChild    0
</IfModule>

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80

Listen 80

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule include_module modules/mod_include.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule unique_id_module modules/mod_unique_id.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imap_module modules/mod_imap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so


#  
# Mason
#
LoadModule perl_module modules/mod_perl.so
PerlRequire "/usr/local/apache2/conf/startup.pl"


PerlModule Apache2
PerlModule Apache::compat
PerlSetVar MasonArgsMethod CGI
PerlModule HTML::Mason::ApacheHandler

<FilesMatch "\.html$">
  SetHandler perl-script
  PerlHandler HTML::Mason::ApacheHandler
</FilesMatch>


#  
#  mod_deflate
#
<Location />
  # Insert filter
  SetOutputFilter DEFLATE

  # Netscape 4.x has some problems...
  BrowserMatch ^Mozilla/4 gzip-only-text/html

  # Netscape 4.06-4.08 have some more problems
  BrowserMatch ^Mozilla/4\.0[678] no-gzip

  # MSIE masquerades as Netscape, but it is fine
  # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

  # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
  # the above regex won't work. You can use the following
  # workaround to get the desired effect:
  BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

  # Don't compress images
  SetEnvIfNoCase Request_URI   \.(?:gif|jpe?g|png)$ no-gzip dont-vary

  # Make sure proxies don't deliver the wrong content
  Header append Vary User-Agent env=!dont-vary

</Location>

DeflateFilterNote ratio
DeflateCompressionLevel 6



#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
#ExtendedStatus On

### Section 2: 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

<IfModule !mpm_winnt.c>
<IfModule !mpm_netware.c>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.  
#
# User/Group: The name (or #number) of the user/group to run httpd as.
#  . On SCO (ODT 3) use "User nouser" and "Group nogroup".
#  . On HPUX you may not be able to use shared memory as nobody, and the
#    suggested workaround is to create a user www and use that user.
#  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
#  when the value of (unsigned)Group is above 60000; 
#  don't use Group #-1 on these systems!
#
User wwwrun
Group nogroup
</IfModule>
</IfModule>

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin Michael.Forman@Colorado.EDU

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work.  See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make 
# redirections work in a sensible way.
#
ServerName www.Michael-Forman.com:80

#
# UseCanonicalName: Determines how Apache constructs self-referencing 
# URLs and the SERVER_NAME and SERVER_PORT variables.
# When set "Off", Apache will use the Hostname and Port supplied
# by the client.  When set "On", Apache will use the value of the
# ServerName directive.
#
UseCanonicalName Off

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/usr/local/apache2/htdocs"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories). 
#
# First, we configure the "default" to be a very restrictive set of 
# features.  
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/usr/local/apache2/htdocs">

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
    Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
    AllowOverride None

#
# Controls who can get stuff from this server.
#
    Order allow,deny
    Allow from all

</Directory>

#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
UserDir doc/public_html

#
# Control access to UserDir directories.  The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory /home/vortex/*/doc/public_html>
    AllowOverride FileInfo AuthConfig Limit Indexes
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    <Limit GET POST OPTIONS PROPFIND>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS PROPFIND>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents.  The MultiViews Option can be used for the 
# same purpose, but it is much slower.
#
DirectoryIndex index.html index.html.var index.shtml index.cgi index.php index.pl index.php3 index.php4 index.phtml

#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride 
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being 
# viewed by Web clients. 
#
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>

#
# TypesConfig describes where the mime.types file (or equivalent) is
# to be found.
#
TypesConfig conf/mime.types

#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value.  If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain

#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type.  The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
<IfModule mod_mime_magic.c>
    MIMEMagicFile conf/magic
</IfModule>

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

#
# EnableMMAP: Control whether memory-mapping is used to deliver
# files (assuming that the underlying OS supports it).
# The default is on; turn this off if you serve from NFS-mounted 
# filesystems.  On some systems, turning it off (regardless of
# filesystem) can improve performance; for details, please see
# http://httpd.apache.org/docs-2.0/mod/core.html#enablemmap
#
#EnableMMAP off

#
# EnableSendfile: Control whether the sendfile kernel support is 
# used  to deliver files (assuming that the OS supports it).
# The default is on; turn this off if you serve from NFS-mounted 
# filesystems.  Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#enablesendfile
#
#EnableSendfile off

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog logs/error_log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined  

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" (%{ratio}n)" combineddeflate

LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate

# You need to enable mod_logio.c to use %I and %O
#LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio

#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here.  Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
CustomLog logs/access_log common

#
# If you would like to have agent and referer logfiles, uncomment the
# following directives.
#
#CustomLog logs/referer_log referer
#CustomLog logs/agent_log agent

#
# If you prefer a single logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
#CustomLog logs/access_log combined

#
# ServerTokens
# This directive configures what you return as the Server HTTP response
# Header. The default is 'Full' which sends information about the OS-Type
# and compiled in modules.
# Set to one of:  Full | OS | Minor | Minimal | Major | Prod
# where Full conveys the most information, and Prod the least.
#
ServerTokens Full

#
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (internal error documents, FTP directory 
# listings, mod_status and mod_info output etc., but not CGI generated 
# documents or custom error documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of:  On | Off | EMail
#
ServerSignature On

#
# Aliases: Add here as many aliases as you need (with no limit). The format is 
# Alias fakename realname
#
# Note that if you include a trailing / on fakename then the server will
# require it to be present in the URL.  So "/icons" isn't aliased in this
# example, only "/icons/".  If the fakename is slash-terminated, then the 
# realname must also be slash terminated, and if the fakename omits the 
# trailing slash, the realname must also omit it.
#
# We include the /icons/ alias for FancyIndexed directory listings.  If you
# do not use FancyIndexing, you may comment this out.
#
Alias /icons/ "/usr/local/apache2/icons/"

<Directory "/usr/local/apache2/icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

#
# This should be changed to the ServerRoot/manual/.  The alias provides
# the manual, even if you choose to move your DocumentRoot.  You may comment
# this out if you do not care for the documentation.
#
AliasMatch ^/manual(?:/(?:de|en|fr|ja|ko|ru))?(/.*)?$ "/usr/local/apache2/manual$1"

<Directory "/usr/local/apache2/manual">
    Options Indexes
    AllowOverride None
    Order allow,deny
    Allow from all

    <Files *.html>
        SetHandler type-map
    </Files>

    SetEnvIf Request_URI ^/manual/de/ prefer-language=de
    SetEnvIf Request_URI ^/manual/en/ prefer-language=en
    SetEnvIf Request_URI ^/manual/fr/ prefer-language=fr
    SetEnvIf Request_URI ^/manual/ja/ prefer-language=ja
    SetEnvIf Request_URI ^/manual/ko/ prefer-language=ko
    SetEnvIf Request_URI ^/manual/ru/ prefer-language=ru
    RedirectMatch 301 ^/manual(?:/(de|en|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2
</Directory>

#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"

<IfModule mod_cgid.c>
#
# Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path>
# for setting UNIX socket for communicating with cgid.
#
#Scriptsock            logs/cgisock
</IfModule>

#
# "/usr/local/apache2/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/usr/local/apache2/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

#
# Redirect allows you to tell clients about documents which used to exist in
# your server's namespace, but do not anymore. This allows you to tell the
# clients where to look for the relocated document.
# Example:
# Redirect permanent /foo http://www.example.com/bar

#
# Directives controlling the display of server-generated directory listings.
#

#
# IndexOptions: Controls the appearance of server-generated directory
# listings.
#
IndexOptions FancyIndexing VersionSort

#
# AddIcon* directives tell the server which icon to show for different
# files or filename extensions.  These are only displayed for
# FancyIndexed directories.
#
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

#
# DefaultIcon is which icon to show for files which do not have an icon
# explicitly set.
#
DefaultIcon /icons/unknown.gif

#
# AddDescription allows you to place a short description after a file in
# server-generated indexes.  These are only displayed for FancyIndexed
# directories.
# Format: AddDescription "description" filename
#
#AddDescription "GZIP compressed document" .gz
#AddDescription "tar archive" .tar
#AddDescription "GZIP compressed tar archive" .tgz

#
# ReadmeName is the name of the README file the server will look for by
# default, and append to directory listings.
#
# HeaderName is the name of a file which should be prepended to
# directory indexes. 
ReadmeName README.html
HeaderName HEADER.html

#
# IndexIgnore is a set of filenames which directory indexing should ignore
# and not include in the listing.  Shell-style wildcarding is permitted.
#
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

#
# DefaultLanguage and AddLanguage allows you to specify the language of 
# a document. You can then use content negotiation to give a browser a 
# file in a language the user can understand.
#
# Specify a default language. This means that all data
# going out without a specific language tag (see below) will 
# be marked with this one. You probably do NOT want to set
# this unless you are sure it is correct for all cases.
#
# * It is generally better to not mark a page as 
# * being a certain language than marking it with the wrong
# * language!
#
# DefaultLanguage nl
#
# Note 1: The suffix does not have to be the same as the language
# keyword --- those with documents in Polish (whose net-standard
# language code is pl) may wish to use "AddLanguage pl .po" to
# avoid the ambiguity with the common suffix for perl scripts.
#
# Note 2: The example entries below illustrate that in some cases 
# the two character 'Language' abbreviation is not identical to 
# the two character 'Country' code for its country,
# E.g. 'Danmark/dk' versus 'Danish/da'.
#
# Note 3: In the case of 'ltz' we violate the RFC by using a three char
# specifier. There is 'work in progress' to fix this and get
# the reference data for rfc1766 cleaned up.
#
# Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
# English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
# Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
# Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
# Norwegian (no) - Polish (pl) - Portugese (pt)
# Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
# Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
#
AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw

#
# LanguagePriority allows you to give precedence to some languages
# in case of a tie during content negotiation.
#
# Just list the languages in decreasing order of preference. We have
# more or less alphabetized them here. You probably want to change this.
#
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW

#
# ForceLanguagePriority allows you to serve a result page rather than
# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
# [in case no accepted languages matched the available variants]
#
ForceLanguagePriority Prefer Fallback

#
# Specify a default charset for all pages sent out. This is
# always a good idea and opens the door for future internationalisation
# of your web site, should you ever want it. Specifying it as
# a default does little harm; as the standard dictates that a page
# is in iso-8859-1 (latin1) unless specified otherwise i.e. you
# are merely stating the obvious. There are also some security
# reasons in browsers, related to javascript and URL parsing
# which encourage you to always set a default char set.
#
AddDefaultCharset ISO-8859-1

#
# Commonly used filename extensions to character sets. You probably
# want to avoid clashes with the language extensions, unless you
# are good at carefully testing your setup after each change.
# See http://www.iana.org/assignments/character-sets for the
# official list of charset names and their respective RFCs.
#
AddCharset ISO-8859-1  .iso8859-1  .latin1
AddCharset ISO-8859-2  .iso8859-2  .latin2 .cen
AddCharset ISO-8859-3  .iso8859-3  .latin3
AddCharset ISO-8859-4  .iso8859-4  .latin4
AddCharset ISO-8859-5  .iso8859-5  .latin5 .cyr .iso-ru
AddCharset ISO-8859-6  .iso8859-6  .latin6 .arb
AddCharset ISO-8859-7  .iso8859-7  .latin7 .grk
AddCharset ISO-8859-8  .iso8859-8  .latin8 .heb
AddCharset ISO-8859-9  .iso8859-9  .latin9 .trk
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5        .Big5       .big5
# For russian, more than one charset is used (depends on client, mostly):
AddCharset WINDOWS-1251 .cp-1251   .win-1251
AddCharset CP866       .cp866
AddCharset KOI8-r      .koi8-r .koi8-ru
AddCharset KOI8-ru     .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-8       .utf8

# The set below does not map to a specific (iso) standard
# but works on a fairly wide range of browsers. Note that
# capitalization actually matters (it should not, but it
# does for some browsers).
#
# See http://www.iana.org/assignments/character-sets
# for a list of sorts. But browsers support few.
#
AddCharset GB2312      .gb2312 .gb 
AddCharset utf-7       .utf7
AddCharset utf-8       .utf8
AddCharset big5        .big5 .b5
AddCharset EUC-TW      .euc-tw
AddCharset EUC-JP      .euc-jp
AddCharset EUC-KR      .euc-kr
AddCharset shift_jis   .sjis

#
# AddType allows you to add to or override the MIME configuration
# file mime.types for specific file types.
#
#AddType application/x-tar .tgz
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
# Despite the name similarity, the following Add* directives have nothing
# to do with the FancyIndexing customization directives above.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi

#
# For files that include their own HTTP headers:
#
#AddHandler send-as-is asis

#
# For server-parsed imagemap files:
#
#AddHandler imap-file map

#
# For type maps (negotiated resources):
# (This is enabled by default to allow the Apache "It Worked" page
#  to be distributed in multiple languages.)
#
AddHandler type-map var

#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml

#
# Action lets you define media types that will execute a script whenever
# a matching file is called. This eliminates the need for repeated URL
# pathnames for oft-used CGI file processors.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
#

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# Putting this all together, we can internationalize error responses.
#
# We use Alias to redirect any /error/HTTP_<error>.html.var response to
# our collection of by-error message multi-language collections.  We use 
# includes to substitute the appropriate text.
#
# You can modify the messages' appearance without changing any of the
# default HTTP_<error>.html.var files by adding the line:
#
#   Alias /error/include/ "/your/include/path/"
#
# which allows you to create your own set of files by starting with the
# /usr/local/apache2/error/include/ files and copying them to /your/include/path/, 
# even on a per-VirtualHost basis.  The default include files will display
# your Apache version number and your ServerAdmin email address regardless
# of the setting of ServerSignature.
#
# The internationalized error documents require mod_alias, mod_include
# and mod_negotiation.  To activate them, uncomment the following 30 lines.

#    Alias /error/ "/usr/local/apache2/error/"
#
#    <Directory "/usr/local/apache2/error">
#        AllowOverride None
#        Options IncludesNoExec
#        AddOutputFilter Includes html
#        AddHandler type-map var
#        Order allow,deny
#        Allow from all
#        LanguagePriority en cs de es fr it nl sv pt-br ro
#        ForceLanguagePriority Prefer Fallback
#    </Directory>
#
#    ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
#    ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
#    ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
#    ErrorDocument 404 /error/404.html
#    ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
#    ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
#    ErrorDocument 410 /error/HTTP_GONE.html.var
#    ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
#    ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
#    ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
#    ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
#    ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
#    ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
#    ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
#    ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
#    ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
#    ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var


#
# The following directives modify normal HTTP response behavior to
# handle known problems with browser implementations.
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0

#
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash.  This fixes a 
# problem with Microsoft WebFolders which does not appropriately handle 
# redirects for folders with DAV methods.
# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully

#
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Change the ".example.com" to match your domain to enable.
#
#<Location /server-status>
#    SetHandler server-status
#    Order deny,allow
#    Deny from all
#    Allow from .example.com
#</Location>

#
# Allow remote server configuration reports, with the URL of
#  http://servername/server-info (requires that mod_info.c be loaded).
# Change the ".example.com" to match your domain to enable.
#
#<Location /server-info>
#    SetHandler server-info
#    Order deny,allow
#    Deny from all
#    Allow from .example.com
#</Location>


#
# Bring in additional module-specific configurations
#
<IfModule mod_ssl.c>
    Include conf/ssl.conf
</IfModule>


### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at 
# <URL:http://httpd.apache.org/docs-2.0/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
#NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

NameVirtualHost 192.168.1.10
NameVirtualHost 67.122.252.25

<VirtualHost 192.168.1.10 67.122.252.25>
    ServerName   www.michael-forman.com
    DocumentRoot /usr/local/apache2/htdocs
    ErrorLog     /usr/local/apache2/logs/error.log 
    CustomLog    /usr/local/apache2/logs/access.log combineddeflate
</VirtualHost>



 

awstats.conf File

Included below is the awstats.conf file for my website. Sections of interest have been highlighted to show where one should insert the code mentioned in this HOWTO file.
# AWSTATS CONFIGURE FILE 6.0
#-----------------------------------------------------------------------------
# Copy this file into awstats.www.mydomain.conf and edit this new config file
# to setup AWStats (See documentation in docs/ directory).
# The config file must be in /etc/awstats, /usr/local/etc/awstats or /etc (for
# Unix/Linux) or same directory than awstats.pl (Windows, Mac, Unix/Linux...)
# To include an environment variable in any parameter (AWStats will replace
# it with its value when reading it), follow the example:
# Parameter="__ENVNAME__"
# Note that environment variable AWSTATS_CURRENT_CONFIG is always defined with
# the config value in an AWStats running session and can be used like others.
#-----------------------------------------------------------------------------
# $Revision: 1.2 $ - $Author: forman $ - $Date: 2003/12/27 18:11:35 $



#-----------------------------------------------------------------------------
# MAIN SETUP SECTION (Required to make AWStats work)
#-----------------------------------------------------------------------------

# "LogFile" contains the web, ftp or mail server log file to analyze.
# Possible values: A full path, or a relative path from awstats.pl directory.
# Example: "/var/log/apache/access.log"
# Example: "../logs/mycombinedlog.log"
# You can also use tags in this filename if you need a dynamic file name
# depending on date or time (Replacement is made by AWStats at the beginning
# of its execution). This is available tags :
#   %YYYY-n  is replaced with 4 digits year we were n hours ago
#   %YY-n    is replaced with 2 digits year we were n hours ago
#   %MM-n    is replaced with 2 digits month we were n hours ago
#   %MO-n    is replaced with 3 letters month we were n hours ago
#   %DD-n    is replaced with day we were n hours ago
#   %HH-n    is replaced with hour we were n hours ago
#   %NS-n    is replaced with number of seconds at 00:00 since 1970
#   %WM-n    is replaced with the week number in month (1-5)
#   %Wm-n    is replaced with the week number in month (0-4)
#   %WY-n    is replaced with the week number in year (01-52)
#   %Wy-n    is replaced with the week number in year (00-51)
#   %DW-n    is replaced with the day number in week (1-7, 1=sunday)
#                              use n=24 if you need (1-7, 1=monday)
#   %Dw-n    is replaced with the day number in week (0-6, 0=sunday)
#                              use n=24 if you need (0-6, 0=monday)
#   Use 0 for n if you need current year, month, day, hour...
# Example: "/var/log/access_log.%YYYY-0%MM-0%DD-0.log"
# Example: "C:/WINNT/system32/LogFiles/W3SVC1/ex%YY-24%MM-24%DD-24.log"
# You can also use a pipe if log file come from a pipe :
# Example: "gzip -d </var/log/apache/access.log.gz |"
# If there is several log files from load balancing servers :
# Example: "/pathtotools/logresolvemerge.pl *.log |"
#
LogFile="/usr/local/apache2/logs/access.log"


# Enter the log file type you want to analyze.
# Possible values:
#  W - For a web log file
#  S - For a streaming log file
#  M - For a mail log file
#  F - For a ftp log file
# Example: W
# Default: W
#
LogType=W


# Enter here your log format (Must match your web server config. See setup
# instructions in documentation know how to configure your web server to have
# the required log format).
# Possible values: 1,2,3,4,5 or "your_own_personalized_log_format"
# 1 - Apache or Lotus Notes/Domino native combined log format (NCSA combined/XLF/ELF log format)
# 2 - IIS log format (W3C log format)
# 3 - Webstar native log format
# 4 - Apache or Squid native common log format (NCSA common/CLF log format)
#     With LogFormat=4, some features (browsers, os, keywords...) can't work.
# "your_own_personalized_log_format" = If your log is ftp, mail or other format,
#     you must use following keys to define the log format string (See FAQ
#     for ftp, mail or exotic web log format examples):
#   %host             Host client name or IP address
#   %lognamequot      Authenticated login/user with format: "alex"
#   %logname          Authenticated login/user with format: alex
#   %time1            Date and time with format: [dd/mmm/yyyy:hh:mm:ss +0000] or [dd/mmm/yyyy:hh:mm:ss]
#   %time2            Date and time with format: yyyy-mm-dd hh:mm:ss
#   %time3            Date and time with format: Mon dd hh:mm:ss
#   %methodurl        Method and URL with format: "GET /index.html HTTP/x.x"
#   %methodurlnoprot  Method and URL with format: "GET /index.html"
#   %method           Method with format: GET
#   %url              URL only with format: /index.html
#   %query            Query string (used by URLWithQuery option)
#   %code             Return code status (with format for web log: 999)
#   %bytesd           Size of document in bytes
#   %refererquot      Referer page with format: "http://from.com/from.htm"
#   %referer          Referer page with format: http://from.com/from.htm
#   %uaquot           User agent with format: "Mozilla/4.0 (compatible, ...)"
#   %ua               User agent with format: Mozilla/4.0_(compatible...)
#   %gzipin           mod_gzip compression input bytes: In:XXX
#   %gzipout          mod_gzip compression output bytes & ratio: Out:YYY:ZZpct.
#   %gzipratio        mod_gzip compression ratio: ZZpct.
#   %deflateratio     mod_deflate compression ratio with format: (ZZ)
#   %email            EMail sender (for mail log)
#   %email_r          EMail receiver (for mail log)
#   %virtualname      Web sever virtual hostname. Use this tag when same log
#                     contains data of several virtual web servers. AWStats
#                     will discard records not in SiteDomain nor HostAliases
#   %cluster          If log file is provided from several computers (merged by
#                     logresolvemerge.pl), this tag define field of cluster id.
#   If your log format has some fields not included in this list, use:
#   %other            Means another field not used
#
# Examples for Apache combined logs (following two examples are equivalent):
# LogFormat = 1
# LogFormat = "%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"
#
# Examples for IIS (following two examples are equivalent):
# LogFormat = 2
# LogFormat = "%time2 %host %logname %method %url %code %bytesd %other %ua %referer"
# 
#LogFormat=1
LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot %deflateratio"

# If your log field's separator is not a space, you can change this parameter.
# This parameter is not used if LogFormat is a predefined value (1,2,3,4,5,6)
# Example: " "
# Example: "\t"
# Example: "|"
# Default: " "
#
LogSeparator=" "


# "SiteDomain" must contain the main domain name, or the main intranet web
# server name, used to reach the web site.
# If you share the same log file for several virtual web servers, this
# parameter is used to tell AWStats to filter record that contains records for
# this virtual host name only (So check that this virtual hostname can be
# found in your log file and use a personalized log format that include the
# %virtualname tag).
# But for multi hosting a better solution is to have one log file for each
# virtual web server. In this case, this parameter is only used to generate
# full URL's links when ShowLinksOnUrl option is set to 1.
# If analysing mail log, enter here the domain name of mail server.
# Example: "myintranetserver"
# Example: "www.domain.com"
# Example: "ftp.domain.com"
# Example: "domain.com"
#
SiteDomain="www.Michael-Forman.com"


# Enter here all other possible domain names, addresses or virtual host
# aliases someone can use to access your site. Try to keep only the minimum
# number of possible names/addresses to have the best performances.
# You can repeat the "SiteDomain" value in this list.
# This parameter is used to analyze referer field in log file and to help
# AWStats to know if a referer URL is a local URL of same site or an URL of
# another site.
# Note: Use space between each value.
# Note: You can use regular expression values writing value with REGEX[value].
# Example: "www.myserver.com localhost 127.0.0.1 REGEX[\.mydomain\.(net|org)$]"
#
#HostAliases="localhost 127.0.0.1 REGEX[^.*\.myserver\.com$]"
HostAliases="67.122.252.25 localhost 127.0.0.1"


# If you want to have hosts reported by name instead of ip address, AWStats
# need to make reverse DNS lookups (if not already done in your log file).
# With DNSLookup to 0, all hosts will be reported by their IP addresses and
# not by the full hostname of visitors (except if names are already available
# in log file).
# If you want/need to set DNSLookup to 1, don't forget that this will reduce
# dramatically AWStats update process speed. Do not use on large web sites.
# Note: Reverse DNS lookup is done on IPv4 only (Enable ipv6 plugin for IPv6).
# Note: Result of DNS Lookup can be used to build the Country report. However
# it is highly recommanded to enable the plugin 'geoipfree' or 'geoip' to
# have an accurate Country report with no need of DNS Lookup.
# Possible values:
# 0 - No DNS Lookup
# 1 - DNS Lookup is fully enabled
# 2 - DNS Lookup is made only from static DNS cache file (if it exists)
# Default: 2
# 
DNSLookup=1


# When AWStats updates its statistics, it stores results of its analysis in 
# files (AWStats database). All those files are written in the directory
# defined by the "DirData" parameter. Set this value to the directory where
# you want AWStats to save its database and working files into.
# Warning: If you want to be able to use the "AllowToUpdateStatsFromBrowser"
# feature (see later), you need "Write" permissions by web server user on this
# directory (and "Modify" for Windows NTFS file systems).
# Example: "/var/lib/awstats"
# Example: "../data"
# Example: "C:/awstats_data_dir"
# Default: "."          (means same directory as awstats.pl)
#
DirData="."


# Relative or absolute web URL of your awstats cgi-bin directory.
# This parameter is used only when AWStats is run from command line
# with -output option (to generate links in HTML reported page).
# Example: "/awstats"
# Default: "/cgi-bin"   (means awstats.pl is in "/yourwwwroot/cgi-bin")
#
DirCgi="/cgi-bin"


# Relative or absolute web URL of your awstats icon directory.
# If you build static reports ("... -output > outputpath/output.html"), enter
# path of icon directory relative to the output directory 'outputpath'.
# Example: "/awstatsicon"
# Example: "../icon"
# Default: "/icon" (means you must copy icon directories in "/mywwwroot/icon")
#
DirIcons="/images/icons/awstats"


# When this parameter is set to 1, AWStats add a button on report page to
# allow to "update" statistics from a web browser. Warning, when "update" is
# made from a browser, AWStats is ran as a CGI by the web server user defined
# in your web server (user "nobody" by default with Apache, "IUSR_XXX" with
# IIS), so the "DirData" directory and all already existing history files
# awstatsMMYYYY[.xxx].txt must be writable by this user. Change permissions if
# necessary to "Read/Write" (and "Modify" for Windows NTFS file systems).
# Warning: Update process can be long so you might experience "time out"
# browser errors if you don't launch AWStats enough frequently.
# When set to 0, update is only made when AWStats is ran from the command
# line interface (or a task scheduler).
# Possible values: 0 or 1
# Default: 0
#
AllowToUpdateStatsFromBrowser=0


# AWStats save and sort its database on a month basis, this allows to build
# build a report quickly. However, if you choose the -month=all from command
# line or value '-Year-' from CGI combo form to have a report for all year,
# AWStats needs to reload all data for full year, and resort them completely,
# requiring a large amount of time, memory and CPU. This might be a problem
# for web hosting providers that offer AWStats for large sites, on shared
# servers, to non CPU cautious customers.
# For this reason, the 'full year' is only enabled on Command Line by default.
# You can change this by setting this parameter to 0, 1, 2 or 3.
# Possible values:
#  0 - Never allowed
#  1 - Allowed on CLI only, -Year- value in combo is not visible
#  2 - Allowed on CLI only, -Year- value in combo is visible but not allowed
#  3 - Possible on CLI and CGI
# Default: 2
#
AllowFullYearView=2



#-----------------------------------------------------------------------------
# OPTIONAL SETUP SECTION (Not required but increase AWStats features)
#-----------------------------------------------------------------------------

# When the update process run, AWStats can set a lock file in TEMP or TMP
# directory. This lock is to avoid to have 2 update processes running at the
# same time to prevent unknown conflicts problems and avoid DoS attacks when
# AllowToUpdateStatsFromBrowser is set to 1.
# Because, when you use lock file, you can experience sometimes problems in
# lock file not correctly removed (killed process for example requires that
# you remove the file manualy), this option is not enabled by default (Do
# not enable this option with no console server access).
# Change : Effective immediatly
# Possible values: 0 or 1
# Default: 0
#
EnableLockForUpdate=0


# AWStats can do reverse DNS lookups through a static DNS cache file that was
# previously created manually. If no path is given in static DNS cache file
# name, AWStats will search DirData directory. This file is never changed.
# This option is not used if DNSLookup=0.
# Note: DNS cache file format is 'minsince1970 ipaddress resolved_hostname'
# or just 'ipaddress resolved_hostname'
# Change : Effective for new updates only
# Example: "/mydnscachedir/dnscache"
# Default: "dnscache.txt"
#
DNSStaticCacheFile="dnscache.txt"


# AWStats can do reverse DNS lookups through a DNS cache file that was created
# by a previous run of AWStats. This file is erased and recreated after each
# statistics update process. You don't need to create and/or edit it.
# AWStats will read and save this file in DirData directory.
# This option is used only if DNSLookup=1.
# Note: If a DNSStaticCacheFile is available, AWStats will check for DNS
# lookup in DNSLastUpdateCacheFile after checking into DNSStaticCacheFile.
# Change : Effective for new updates only
# Example: "/mydnscachedir/dnscachelastupdate"
# Default: "dnscachelastupdate.txt"
#
DNSLastUpdateCacheFile="dnscachelastupdate.txt"


# You can specify specific IP addresses that should NOT be looked up in DNS.
# This option is used only if DNSLookup=1.
# Note: Use space between each value.
# Note: You can use regular expression values writing value with REGEX[value].
# Change : Effective for new updates only
# Example: "123.123.123.123 REGEX[^192\.168\.]"
# Default: ""
#
SkipDNSLookupFor="REGEX[^192\.168\.]"


# The following two parameters allow you to protect a config file from being
# read by AWStats when called from a browser if web user has not been
# authenticated. Your AWStats program must be in a web protected "realm" (With
# Apache, you can use .htaccess files to do so. With other web servers, see
# your server setup manual).
# Change : Effective immediatly
# Possible values: 0 or 1
# Default: 0
#
AllowAccessFromWebToAuthenticatedUsersOnly=0


# This parameter give the list of all authorized authenticated users to view
# statistics for this domain/config file. This parameter is used only if
# AllowAccessFromWebToAuthenticatedUsersOnly is set to 1.
# Change : Effective immediatly
# Example: "user1 user2"
# Example: "__REMOTE_USER__"
# Default: ""
#
AllowAccessFromWebToFollowingAuthenticatedUsers=""


# When this parameter is define to something, the IP address of the user that
# read its statistics from a browser (when AWStats is used as a CGI) is
# checked and must match one of the IP address values or ranges.
# Change : Effective immediatly
# Example: "127.0.0.1 123.123.123.1-123.123.123.255"
# Default: ""
#
AllowAccessFromWebToFollowingIPAddresses=""


# If the "DirData" directory (see above) does not exists, AWStats return an
# error. However, you can ask AWStats to create it.
# This option can be used by some Web Hosting Providers that has defined a 
# dynamic value for DirData (for example DirData="/home/__REMOTE_USER__") and
# don't want to have to create a new directory each time they add a new user.
# Change : Effective immediatly
# Possible values: 0 or 1
# Default: 0
#
CreateDirDataIfNotExists=0


# If you can choose in which format tha awstats history database is saved.
# For the moment, only text is supported.
# Possible values: text
# Default: text
#
BuildHistoryFormat=text


# If you prefer having the report output pages be built as XML compliant pages
# instead of simple HTML pages, you can set this to 'xml' (May not works
# properly with some browsers).
# Possible values: html or xml
# Default: html
#
BuildReportFormat=html


# In most case, AWStats is used as a cgi program. So AWStats process is ran
# by default web server user (nobody for Unix, IUSR_xxx for IIS/Windows,...).
# To make use easier and avoid permission's problems between update process 
# (run by an admin user) and CGI process (ran by a low level user), AWStats
# save its database files with read and write for everyone.
# If you have experience on managing security policies (Web Hosting Provider),
# you should set this parameter to 0. AWStats will keep default process user
# permissions on its files.
# Change : Effective for new updates only
# Possible values: 0 or 1
# Default: 1
#
SaveDatabaseFilesWithPermissionsForEveryone=1


# AWStats can purge log file, after analyzing it. Note that AWStats is able
# to detect new lines in a log file, to process only them, so you can launch
# AWStats as often as you want, even with this parameter to 0.
# With 0, no purge is made, so you must use a scheduled task or a web server
# that make this purge frequently.
# With 1, the purge of the log file is made each time AWStats update is ran.
# This parameter doesn't work with IIS (This web server doesn't let its log
# file to be purged).
# Change : Effective for new updates only
# Possible values: 0 or 1
# Default: 0
#
PurgeLogFile=0


# When PurgeLogFile is setup to 1, AWStats will clean your log file after
# processing it. You can however keep an archive file (saved in "DirData") of
# all processed log records by setting this to 1 (For example if you want to
# use another log analyzer).
# This parameter is not used if PurgeLogFile=0
# Change : Effective for new updates only
# Possible values: 0 or 1
# Default: 0
#
ArchiveLogRecords=0


# Each time you run the update process, AWStats overwrite the 'historic file'
# for the month (awstatsMMYYYY[.*].txt) with the updated one.
# When write errors occurs (IO, disk full,...), this historic file can be
# corrupted and must be deleted. Because this file contains information of all
# past processed log files, you will loose old stats if removed. So you can
# ask AWStats to save last non corrupted file in a .bak file. This file is
# stored in "DirData" directory with other 'historic files'.
# Change : Effective for new updates only
# Possible values: 0 or 1
# Default: 0
#
KeepBackupOfHistoricFiles=0


# Default index page name for your web server.
# Change : Effective for new updates only
# Example: "index.php index.html default.html"
# Default: "index.html"
#
DefaultFile="index.html"


# Do not include access from clients that match following criteria.
# If your log file contains IP adresses in host field, you must enter here
# matching IP adresses criteria.
# If DNS lookup is already done in your log file, you must enter here hostname
# criteria, else enter ip address criteria.
# The opposite parameter of "SkipHosts" is "OnlyHosts".
# Note: Use space between each value. This parameter is not case sensitive.
# Note: You can use regular expression values writing value with REGEX[value].
# Change : Effective for new updates only
# Example: "127.0.0.1 REGEX[^192\.168\.] REGEX[^10\.]"
# Example: "localhost REGEX[^.*\.localdomain$]"
# Default: ""
#
SkipHosts="localhost REGEX[^192\.168\.]"


# Do not include access from clients with a user agent that match following
# criteria. If you want to exclude a robot, you should update the robots.pm
# file instead of this parameter.
# The opposite parameter of "SkipUserAgents" is "OnlyUserAgents".
# Note: Use space between each value. This parameter is not case sensitive.
# Note: You can use regular expression values writing value with REGEX[value].
# Change : Effective for new updates only
# Example: "konqueror REGEX[ua_test_v\d\.\d]"
# Default: ""
#
SkipUserAgents=""


# Use SkipFiles to ignore access to URLs that match one of following entries.
# You can enter a list of not important URLs (like framed menus, hidden pages,
# etc...) to exclude them from statistics. You must enter here exact relative
# URL as found in log file, or a matching REGEX value.
# For example, to ignore /badpage.html, just add "/badpage.html". To ignore
# all pages in a particular directory, add "REGEX[^\/directorytoexclude]".
# The opposite parameter of "SkipFiles" is "OnlyFiles".
# Note: Use space between each value. This parameter is not case sensitive.
# Note: You can use regular expression values writing value with REGEX[value].
# Change : Effective for new updates only
# Example: "/badpage.html REGEX[^\/excludedirectory]"
# Default: ""
#
SkipFiles=""


# Include in stats, only accesses from hosts that match one of following
# entries. For example, if you want AWStats to filter access to keep only
# stats for visits from particular hosts, you can add those hosts names in
# this parameter.
# If DNS lookup is already done in your log file, you must enter here hostname
# criteria, else enter ip address criteria.
# The opposite parameter of "OnlyHosts" is "SkipHosts".
# Note: Use space between each value. This parameter is not case sensitive.
# Note: You can use regular expression values writing value with REGEX[value].
# Change : Effective for new updates only
# Example: "127.0.0.1 REGEX[^192\.168\.] REGEX[^10\.]"
# Default: ""
#
OnlyHosts=""


# Include in stats, only accesses from user agent that match one of following
# entries. For example, if you want AWStats to filter access to keep only
# stats for visits from particular browsers, you can add their user agents
# string in this parameter.
# The opposite parameter of "OnlyUserAgents" is "SkipUserAgents".
# Note: Use space between each value. This parameter is not case sensitive.
# Note: You can use regular expression values writing value with REGEX[value].
# Change : Effective for new updates only
# Example: "msie"
# Default: ""
#
OnlyUserAgents=""


# Include in stats, only accesses to URLs that match one of following entries.
# For example, if you want AWStats to filter access to keep only stats that
# match a particular string, like a particular directory, you can add this
# directory name in this parameter.
# The opposite parameter of "OnlyFiles" is "SkipFiles".
# Note: Use space between each value. This parameter is not case sensitive.
# Note: You can use regular expression values writing value with REGEX[value].
# Change : Effective for new updates only
# Example: "REGEX[marketing_directory] REGEX[office\/.*\.(csv|sxw)$]"
# Default: ""
#
OnlyFiles=""


# Add here a list of kind of url (file extension) that must be counted as
# "Hit only" and not as a "Hit" and "Page/Download". You can set here all
# images extensions as they are hit downloaded that must be counted but they
# are not viewed pages. URLs with such extensions are not included in the TOP
# Pages/URL report.
# Note: If you want to exclude particular URLs from stats (No Pages and no
# Hits reported), you must use SkipFiles parameter.
# Change : Effective for new updates only
# Example: "css js class gif jpg jpeg png bmp ico zip arj gz z wav mp3 wma mpg"
# Example: ""
# Default: "css js class gif jpg jpeg png bmp ico"
#
NotPageList="css js class gif jpg jpeg png bmp ico"


# By default, AWStats considers that records found in web log file are
# successful hits if HTTP code returned by server is a valid HTTP code (200
# and 304). Any other code are reported in HTTP status chart.
# Note that HTTP 'control codes', like redirection (302, 305) are not added by
# default in this list as they are not pages seen by a visitor but are
# protocol exchange codes to tell the browser to ask another page. Because
# this other page will be counted and seen with a 200 or 304 code, if you 
# add such codes, you will have 2 pages viewed reported for only one in facts.
# Change : Effective for new updates only
# Example: "200 304 302 305"
# Default: "200 304"
#
ValidHTTPCodes="200 304"


# By default, AWStats considers that records found in mail log file are
# successful mail transfers if field that represent return code in analyzed
# log file match values defined by this parameter.
# Change : Effective for new updates only
# Example: "1 250 200"
# Default: "1 250"
#
ValidSMTPCodes="1 250"


# Some web servers on some Operating systems (IIS-Windows) considers that a
# login with same value but different case are the same login. To tell AWStats
# to also considers them as one, set this parameter to 1.
# Change : Effective for new updates only
# Possible values: 0 or 1
# Default: 0
# 
AuthenticatedUsersNotCaseSensitive=0


# Some web servers on some Operating systems (IIS-Windows) considers that two
# URLs with same value but different case are the same URL. To tell AWStats to
# also considers them as one, set this parameter to 1.
# Change : Effective for new updates only
# Possible values: 0 or 1
# Default: 0
# 
URLNotCaseSensitive=0


# Keep or remove the anchor string you can find in some URLs.
# Change : Effective for new updates only
# Possible values: 0 or 1
# Default: 0
#
URLWithAnchor=0


# In URL links, "?" char is used to add parameter's list in URLs. Syntax is:
# /mypage.html?param1=value1¶m2;=value2
# However, some servers/sites use also others chars to isolate dynamic part of
# their URLs. You can complete this list with all such characters.
# Change : Effective for new updates only
# Example: "?;,"
# Default: "?;"
#
URLQuerySeparators="?;"


# Keep or remove the query string to the URL in the statistics for individual
# pages. This is primarily used to differentiate between the URLs of dynamic
# pages. If set to 1, mypage.html?id=x and mypage.html?id=y are counted as two
# different pages.
# Warning, when set to 1, memory required to run AWStats is dramatically
# increased if you have a lot of changing URLs (for example URLs with a random
# id inside). Such web sites should not set this option to 1 or use seriously
# the next parameter URLWithQueryWithOnlyFollowingParameters (or eventually 
# URLWithQueryWithoutFollowingParameters).
# Change : Effective for new updates only
# Possible values:
# 0 - URLs are cleaned from the query string (ie: "/mypage.html")
# 1 - Full URL with query string is used     (ie: "/mypage.html?p=x&q;=y")
# Default: 0
# 
URLWithQuery=0


# When URLWithQuery is on, you will get the full URL with all parameters in
# URL reports. But among thoose parameters, sometimes you don't need a
# particular parameter because it does not identify the page or because it's
# a random ID changing for each access even if URL points to same page. In
# such cases, it is higly recommanded to ask AWStats to keep only parameters
# you need (if you know them) before counting, manipulating and storing it.
# Enter here list of wanted parameters. For example, with "param", one hit on
# /mypage.cgi?param=abc&id;=Yo4UomP9d and /mypage.cgi?param=abc&id;=Mu8fdxl3r
# will be reported as 2 hits on /mypage.cgi?param=abc
# This parameter is not used when URLWithQuery is 0 and can't be used with
# URLWithQueryWithoutFollowingParameters.
# Change : Effective for new updates only
# Example: "param"
# Default: ""
# 
URLWithQueryWithOnlyFollowingParameters=""


# When URLWithQuery is on, you will get the full URL with all parameters in
# URL reports. But among thoose parameters, sometimes you don't need a
# particular parameter because it does not identify the page or because it's
# a random ID changing for each access even if URL points to same page. In
# such cases, it is higly recommanded to ask AWStats to remove such parameters
# from the URL before counting, manipulating and storing it. Enter here list
# of all non wanted parameters. For example if you enter "id", one hit on
# /mypage.cgi?p=abc&id;=Yo4UomP9d and /mypage.cgi?p=abc&id;=Mu8fdxl3r
# will be reported as 2 hits on /mypage.cgi?p=abc
# This parameter is not used when URLWithQuery is 0 and can't be used with
# URLWithQueryWithOnlyFollowingParameters.
# Change : Effective for new updates only
# Example: "PHPSESSID jsessionid"
# Default: ""
# 
URLWithQueryWithoutFollowingParameters=""


# Keep or remove the query string to the referrer URL in the statistics for
# external referrer pages. This is used to differentiate between the URLs of
# dynamic referrer pages. If set to 1, mypage.html?id=x and mypage.html?id=y
# are counted as two different referrer pages.
# Change : Effective for new updates only
# Possible values:
# 0 - Referrer URLs are cleaned from the query string (ie: "/mypage.html")
# 1 - Full URL with query string is used      (ie: "/mypage.html?p=x&q;=y")
# Default: 0
# 
URLReferrerWithQuery=0


# AWStats can detect setup problems or show you important informations to have
# a better use. Keep this to 1, except if AWStats says you can change it.
# Change : Effective immediatly
# Possible values: 0 or 1
# Default: 1
#
WarningMessages=1


# When an error occurs, AWStats output a message related to errors. If you
# want (in most cases for security reasons) to have no error messages, you
# can set this parameter to your personalized generic message.
# Change : Effective immediatly
# Example: "An error occured. Contact your Administrator"
# Default: ""
#
ErrorMessages=""


# AWStat can be run with debug=x parameter to ouput various informations
# to help in debugging or solving troubles. If you want (in most cases for 
# security reasons) to disable debugging, set this parameter to 0.
# Change : Effective immediatly
# Possible values: 0 or 1
# Default: 1
#
DebugMessages=1


# To help you to detect if your log format is good, AWStats report an error
# if all the first NbOfLinesForCorruptedLog lines have a format that does not
# match the LogFormat parameter.
# However, some worm virus attack on your web server can result in a very high
# number of corrupted lines in your log. So if you experience awstats stop
# because of bad virus records at the beginning of your log file, you can
# increase this parameter (very rare).
# Change : Effective for new updates only
# Default: 50
#
NbOfLinesForCorruptedLog=50


# For some particular integration needs, you may want to have CGI links to
# point to another script than awstats.pl.
# Use the name of this script in WrapperScript parameter.
# Change : Effective immediatly
# Example: "awstatslauncher.pl"
# Default: ""
#
WrapperScript=""


# DecodeUA must be set to 1 if you use Roxen web server. This server converts
# all spaces in user agent field into %20. This make the AWStats robots, os
# and browsers detection fail in some cases. Just change it to 1 if and only
# if your web server is Roxen.
# Change : Effective for new updates only
# Possible values: 0 or 1
# Default: 0
#
DecodeUA=0


# MiscTrackerUrl can be used to make AWStats able to detect some miscellanous
# things, that can not be tracked on other way like:
# - Screen size
# - Color depth
# - Java enabled
# - Macromedia Director plugin
# - Macromedia Shockwave plugin
# - Realplayer G2 plugin
# - QuickTime plugin
# - Mediaplayer plugin
# - Acrobat PDF plugin
# To enable all this features, you must copy the awstats_misc_tracker.js file
# into a /js/ directory stored in your web document root and add the following
# HTML code at the end of your index page (before </BODY>) :
# <script language=javascript src="/js/awstats_misc_tracker.js"></script>
# If code is not added in index page, all this detection capabilities will be
# disabled. You must also check that ShowScreenSizeStats and ShowMiscStats
# parameters are set to 1 to make results appear in report page.
# If you want to use another directory than /js/, you must also change the
# awstatsmisctrackerurl variable into the awstats_misc_tracker.js file.
# Change : Effective for new updates only.
# Possible value: Full URL of javascript tracker file added in HTML code
# Default: "/js/awstats_misc_tracker.js"
#
MiscTrackerUrl="/lib/awstats_misc_tracker.js"



#-----------------------------------------------------------------------------
# OPTIONAL ACCURACY SETUP SECTION (Not required but increase AWStats features)
#-----------------------------------------------------------------------------

# Following values allows you to define accuracy of AWStats entities (robots,
# browsers, os, referers, file types) detection.
# It is recommanded that very important web sites or ISP that provides AWStats
# to their customer set this parameter to 1 (or 0), instead of 2.
# Possible values:
#  0 = No detection,
#  1 = Medium/Standard detection
#  2 = Full detection
# Change : Effective for new updates only
# Default: 2 (0 for LevelForWormsDetection)
#
LevelForBrowsersDetection=2				# 0 disables Browsers detection.
LevelForOSDetection=2					# 0 disables OS detection.
LevelForRefererAnalyze=2				# 0 disables Origin detection.
LevelForRobotsDetection=2				# 0 disables Robots detection.
LevelForSearchEnginesDetection=2		# 0 disables Search engines detection.
LevelForFileTypesDetection=2			# 0 disables File types detection.
LevelForWormsDetection=2				# 0 disables Worms detection.



#-----------------------------------------------------------------------------
# OPTIONAL APPEARANCE SETUP SECTION (Not required but increase AWStats features)
#-----------------------------------------------------------------------------

# When you use AWStats as a CGI, you can have the reports shown in HTML frames.
# Frames are only available for report viewed dynamically. When you build
# pages from command line, this option is not used and no frames are built.
# Possible values: 0 or 1
# Default: 1
#
UseFramesWhenCGI=0


# This parameter ask your browser to open detailed reports into a different
# window than the main page.
# Possible values:
# 0 - Open all in same browser window
# 1 - Open detailed reports in another window except if using frames
# 2 - Open always in a different window even if reports are framed
# Default: 1
#
DetailedReportsOnNewWindows=1


# You can add, in the HTML report page, a cache lifetime (in seconds) that
# will be returned to browser in HTTP header answer by server.
# This parameter is not used when report are built with -staticlinks option.
# Example: 3600
# Default: 0
#
Expires=0


# To avoid too large web pages, you can ask AWStats to limit number of rows of
# all reported charts to this number when no other limit apply.
# Default: 1000
#
MaxRowsInHTMLOutput=1000


# Set your primary language.
# Possible value:
#  Albanian=al, Bosnian=ba, Bulgarian=bg, Catalan=ca,
#  Chinese (Taiwan)=tw, Chinese (Simpliefied)=cn, Czech=cz, Danish=dk,
#  Dutch=nl, English=en, Estonian=et, Euskara=eu, Finnish=fi,
#  French=fr, Galician=gl, German=de, Greek=gr, Hebrew=he, Hungarian=hu,
#  Icelandic=is, Indonesian=id, Italian=it, Japanese=jp, Korean=kr,
#  Latvian=lv, Norwegian (Nynorsk)=nn, Norwegian (Bokmal)=nb, Polish=pl,
#  Portuguese=pt, Portuguese (Brazilian)=br, Romanian=ro, Russian=ru,
#  Serbian=sr, Slovak=sk,  Spanish=es, Swedish=se, Turkish=tr, Ukrainian=ua,
#  Welsh=wlk.
#  First available language accepted by browser=auto
# Default: "auto"
#
Lang="auto"


# Set the location of language files.
# Example: "/usr/share/awstats/lang"
# Default: "./lang" (means lang directory is in same location than awstats.pl)
#
DirLang="./lang"


# You choose here which reports you want to see in the main page and what you
# want to see in those reports.
# Possible values:
#  0  - Topic is not shown at all
#  1  - Report is shown with default informations
# XYZ - Report is shown with only informations defined by code X,Y,Z...
#       X,Y,Z... are code letters among the following:
#        U = Unique visitors
#        V = Visits
#        P = Number of pages
#        H = Number of hits (or mails)
#        B = Bandwith (or total mail size for mail logs)
#        L = Last access date
#        E = Entry pages
#        X = Exit pages
#        C = Web compression (mod_gzip,mod_deflate)
#        M = Average mail size (mail logs)
#
# Show menu header with report links
# Default: 1, Possible codes: None
ShowMenu=1					
# Show monthly chart
# Default: UVPHB, Possible codes: UVPHB
ShowMonthStats=UVPHB
# Show days of month chart
# Default: VPHB, Possible codes: VPHB
ShowDaysOfMonthStats=VPHB
# Show days of week chart
# Default: PHB, Possible codes: PHB
ShowDaysOfWeekStats=PHB
# Show hourly chart
# Default: PHB, Possible codes: PHB
ShowHoursStats=PHB
# Show domains/country chart
# Default: PHB, Possible codes: PHB
ShowDomainsStats=PHB
# Show hosts chart
# Default: PHBL, Possible codes: PHBL
ShowHostsStats=PHBL
# Show authenticated users chart
# Default: 0, Possible codes: PHBL
ShowAuthenticatedUsers=0
# Show robots chart
# Default: HBL, Possible codes: HBL
ShowRobotsStats=HBL
# Show worms chart
# Default: 0 (See also LevelForWormsDetection if set), Possible codes: HBL
ShowWormsStats=HBL
# Show email senders chart (For use when analyzing mail log files)
# Default: 0, Possible codes: HBML
ShowEMailSenders=0
# Show email receivers chart (For use when analyzing mail log files)
# Default: 0, Possible codes: HBML
ShowEMailReceivers=0
# Show session chart
# Default: 1, Possible codes: None
ShowSessionsStats=1
# Show pages-url chart.
# Default: PBEX, Possible codes: PBEX
ShowPagesStats=PBEX 
# Show file types chart.
# Default: HB, Possible codes: HBC
ShowFileTypesStats=HBC
# Show file size chart (Not yet available)
# Default: 1, Possible codes: None
ShowFileSizesStats=1		
# Show operating systems chart
# Default: 1, Possible codes: None
ShowOSStats=1
# Show browsers chart
# Default: 1, Possible codes: None
ShowBrowsersStats=1
# Show screen size chart
# Default: 0 (See also MiscTrackerUrl if set to 1), Possible codes: None
ShowScreenSizeStats=1
# Show origin chart
# Default: PH, Possible codes: PH
ShowOriginStats=PH
# Show keyphrases chart
# Default: 1, Possible codes: None
ShowKeyphrasesStats=1
# Show keywords chart
# Default: 1, Possible codes: None
ShowKeywordsStats=1
# Show misc chart
# Default: a (See also MiscTrackerUrl parameter), Possible codes: ajdfrqwp
ShowMiscStats=ajdfrqwp
# Show http errors chart
# Default: 1, Possible codes: None
ShowHTTPErrorsStats=1
# Show smtp errors chart (For use when analyzing mail log files)
# Default: 0, Possible codes: None
ShowSMTPErrorsStats=0
# Show the cluster report (Your LogFormat must contains the %cluster tag)
# Default: 0, Possible codes: PHB
ShowClusterStats=0


# Some graphical reports are followed by the data array of values.
# If you don't want this array (to reduce report size for example), you can
# set thoose options to 0.
# Possible values: 0 or 1
# Default: 1
#
# Data array values for the ShowMonthStats report
AddDataArrayMonthStats=1
# Data array values for the ShowDaysOfMonthStats report
AddDataArrayShowDaysOfMonthStats=1
# Data array values for the ShowDaysOfWeekStats report
AddDataArrayShowDaysOfWeekStats=1
# Data array values for the ShowHoursStats report
AddDataArrayShowHoursStats=1


# Following parameter can be used to choose maximum number of lines shown for
# the particular following report.
#
# Stats by countries/domains
MaxNbOfDomain = 25
MinHitDomain  = 1
# Stats by hosts
MaxNbOfHostsShown = 25
MinHitHost    = 1
# Stats by authenticated users
MaxNbOfLoginShown = 25
MinHitLogin   = 1
# Stats by robots
MaxNbOfRobotShown = 25
MinHitRobot   = 1
# Stats by pages
MaxNbOfPageShown = 25
MinHitFile    = 1
# Stats by OS
MaxNbOfOsShown = 25
MinHitOs      = 1
# Stats by browsers
MaxNbOfBrowsersShown = 25
MinHitBrowser = 1
# Stats by screen size
MaxNbOfScreenSizesShown = 10
MinHitScreenSize = 1
# Stats by referers
MaxNbOfRefererShown = 25
MinHitRefer   = 1
# Stats for keyphrases
MaxNbOfKeyphrasesShown = 25
MinHitKeyphrase = 1
# Stats for keywords
MaxNbOfKeywordsShown = 25
MinHitKeyword = 1
# Stats for sender or receiver emails
MaxNbOfEMailsShown = 25
MinHitEMail   = 1


# Choose if you want the week report to start on sunday or monday
# Possible values:
# 0 - Week start on sunday
# 1 - Week start on monday
# Default: 1
#
FirstDayOfWeek=1


# List of visible flags that links to other language translations.
# See Lang parameter for list of allowed flag/language codes.
# If you don't want any flag link, set ShowFlagLinks to "".
# This parameter is used only if ShowMenu parameter is set to 1.
# Possible values: "" or "language_codes_separated_by_space"
# Example: "en es fr nl es"
# Default: ""
#
ShowFlagLinks="en es fr nl de"


# Each URL, shown in stats report views, are links you can click.
# Possible values: 0 or 1
# Default: 1
#
ShowLinksOnUrl=1


# When AWStats build HTML links in its report pages, it starts thoose link
# with "http://". However some links might be HTTPS links, so you can enter
# here the root of all your HTTPS links. If all your site is a SSL web site,
# just enter "/".
# This parameter is not used if ShowLinksOnUrl is 0.
# Example: "/shopping"
# Example: "/"
# Default: ""
#
UseHTTPSLinkForUrl="/information/awstats"


# Maximum length of URL part shown on stats page (number of characters).
# This affects only URL visible text, link still work.
# Default: 64
#
MaxLengthOfShownURL=64


# You can enter HTML code that will be added at the top of AWStats reports.
# Default: ""
#
HTMLHeadSection=""


# You can enter HTML code that will be added at the end of AWStats reports.
# Great to add advert ban.
# Default: ""
#
HTMLEndSection=""


# You can set Logo and LogoLink to use your own logo.
# Logo must be the name of image file (must be in $DirIcons/other directory).
# LogoLink is the expected URL when clicking on Logo.
# Default: "awstats_logo6.png"
#
Logo="awstats_logo1.png"
LogoLink="http://awstats.sourceforge.net"


# Value of maximum bar width/height for horizontal/vertical HTML graphics bar.
# Default: 260/90
#
BarWidth   = 260
BarHeight  = 90


# You can ask AWStats to use a particular CSS (Cascading Style Sheet) to
# change its look. To create a style sheet, you can use samples provided with
# AWStats in wwwroot/css directory.
# Example: "/awstatscss/awstats_bw.css"
# Example: "/css/awstats_bw.css"
# Default: ""
#
StyleSheet=""


# Those colors parameters can be used (if StyleSheet parameter is not used)
# to change AWStats look.
# Example: color_name="RRGGBB"	# RRGGBB is Red Green Blue components in Hex
#
color_Background="FFFFFF"		# Background color for main page (Default = "FFFFFF")
color_TableBGTitle="CCCCDD"		# Background color for table title (Default = "CCCCDD")
color_TableTitle="000000"		# Table title font color (Default = "000000")
color_TableBG="CCCCDD"			# Background color for table (Default = "CCCCDD")
color_TableRowTitle="FFFFFF"	# Table row title font color (Default = "FFFFFF")
color_TableBGRowTitle="ECECEC"	# Background color for row title (Default = "ECECEC")
color_TableBorder="ECECEC"		# Table border color (Default = "ECECEC")
color_text="000000"				# Color of text (Default = "000000")
color_textpercent="606060"		# Color of text for percent values (Default = "606060")
color_titletext="000000"		# Color of text title within colored Title Rows (Default = "000000")
color_weekend="EAEAEA"			# Color for week-end days (Default = "EAEAEA")
color_link="0011BB"				# Color of HTML links (Default = "0011BB")
color_hover="605040"			# Color of HTML on-mouseover links (Default = "605040") 
color_u="FFAA66"				# Background color for number of unique visitors (Default = "FFAA66")
color_v="F4F090"				# Background color for number of visites (Default = "F4F090")
color_p="4477DD"				# Background color for number of pages (Default = "4477DD")
color_h="66DDEE"				# Background color for number of hits (Default = "66DDEE")
color_k="2EA495"				# Background color for number of bytes (Default = "2EA495")
color_s="8888DD"				# Background color for number of search (Default = "8888DD")
color_e="CEC2E8"				# Background color for number of entry pages (Default = "CEC2E8")
color_x="C1B2E2"				# Background color for number of exit pages (Default = "C1B2E2")



#-----------------------------------------------------------------------------
# PLUGINS
#-----------------------------------------------------------------------------

# Add here all plugins file you want to load.
# Plugin files must be .pm files stored in 'plugins' directory.
# Uncomment LoadPlugin lines to enable a plugin after checking that perl
# modules required by the plugin are installed.

# Plugin: Tooltips
# Perl modules required: None
# Add some tooltips help on HTML report pages.
# Note that enabled this kind of help will increased HTML report pages size,
# so server load and bandwidth.
#
#LoadPlugin="tooltips"

# Plugin: DecodeUTFKeys
# Perl modules required: Encode and URI::Escape
# Allow AWStats to show correctly (in language charset) keywords/keyphrases
# strings even if they were UTF8 coded by the referer search engine.
#
LoadPlugin="decodeutfkeys"

# Plugin: IPv6
# Perl modules required: Net::IP and Net::DNS
# This plugin gives AWStats capability to make reverse DNS lookup on IPv6
# addresses.
# Note: If you are interesting in having country report, you should use the
# geoipfree or geoip plugin instead of enabled reverse DNS lookup.
#
#LoadPlugin="ipv6"

# Plugin: HashFiles
# Perl modules required: Storable
# AWStats DNS cache files are read/saved as native hash files. This increase
# DNS cache files loading speed, above all for very large web sites.
#
#LoadPlugin="hashfiles"

# Plugin: GeoIPfree
# Perl modules required: Geo::IPfree version 0.2+ (from Graciliano M.P.)
# Country chart is built from an Internet IP-Country database.
# This plugin is useless for intranet only log files.
# Note: You must choose between using this plugin (need Perl Geo::IPfree module)
# or the GeoIP plugin (need Perl Geo::IP module from Maxmind).
# This plugin reduces AWStats speed of 10% !
#
LoadPlugin="geoipfree"

# Plugin: GeoIP
# Perl modules required: Geo::IP or Geo::IP::PurePerl (from Maxmind)
# Country chart is built from an Internet IP-Country database.
# This plugin is useless for intranet only log files.
# Note: You must choose between using this plugin (need Perl Geo::IP module 
# from Maxmind) or the GeoIPfree plugin (need Perl Geo::IPfree module).
# This plugin reduces AWStats speed of 10% !
#
#LoadPlugin="geoip"

# Plugin: UserInfo
# Perl modules required: None
# Add a text (Firtname, Lastname, Office Department, ...) in authenticated user
# reports for each login value.
# A text file called userinfo.myconfig.txt, with two fields (first is login,
# second is text to show) separated by a tab char. must be created in plugins
# directory.
#
#LoadPlugin="userinfo"

# Plugin: HostInfo
# Perl modules required: XWhois
# Add a column into host chart with a link to open a popup window that shows
# info on host (like whois records).
#
LoadPlugin="hostinfo"

# Plugin: UrlAliases
# Perl modules required: None
# Add a text (Page title, description...) in URL reports after URL value.
# A text file called urlalias.myconfig.txt, with two fields (first is URL,
# second is text to show) separated by a tab char. must be created in plugins
# directory.
#
#LoadPlugin="urlalias"

# Plugin: TimeHiRes
# Perl modules required: Time::HiRes
# Time reported by -showsteps option is in millisecond. For debug purpose.
#
#LoadPlugin="timehires"		

# Plugin: TimeZone
# Perl modules required: Time::Local
# Allow AWStats to correct a bad timezone for user of some IIS that use
# GMT date in its log instead of local server time.
# This module is useless for Apache and most IIS version.
# This plugin reduces AWStats speed of 40% !!!!!!!
#
#LoadPlugin="timezone +2"

# Plugin: Rawlog
# Perl modules required: None
# This plugin adds a form in AWStats main page to allow users to see raw
# content of current log files. A filter is also available.
#
LoadPlugin="rawlog"

# Plugin: GraphApplet
# Perl modules required: None
# Supported charts are built by a 3D graphic applet.
#
#LoadPlugin="graphapplet"				# EXPERIMENTAL FEATURE



#-----------------------------------------------------------------------------
# EXTRA SECTIONS
#-----------------------------------------------------------------------------

# You can define your own charts, you choose here what are rows and columns
# keys. This feature is particularly usefull for marketing purpose, tracking
# products orders for example.
# For this, edit all parameters of Extra section. Each set of parameter is a
# different chart. For several charts, duplicate section changing the number.
# Note: Each Extra section reduces AWStats speed by 8%.
#
# WARNING: A wrong setup of Extra section might result in too large arrays
# that will consume all your memory, making AWStats unusable after several
# updates, so be sure to setup it correctly.
# In most cases, you don't need this feature.
#
# ExtraSectionNameX is title of your personalized chart.
# ExtraSectionConditionalX are conditions you can use to count or not the hit,
#   Use one of the field condition (URL, QUERY_STRING, REFERER, UA, HOST),
#   and a regex to match after a coma. Use "|" for "OR". If you use several
#   conditions, they will be combined as "AND".
# ExtraSectionFirstColumnTitleX is the first column title of the chart.
# ExtraSectionFirstColumnValuesX is a Regex string to tell AWStats in which 
#   field to extract value from (URL, QUERY_STRING, REFERER, UA, HOST) and how
#   to extract the value (using regex syntax). Each different value found will
#   appear in first column of report on a different row. Be sure that list of
#   different values is "limited" to avoid "not enough memory" problems !
# ExtraSectionFirstColumnFormatX is the string used to write value.
# ExtraSectionStatTypesX are things you want to count. You can use standard
#   code letters (P for pages,H for hits,B for bandwidth,L for last access).
# ExtraSectionAddAverageRowX add a row at bottom of chart with average values.
# ExtraSectionAddSumRowX add a row at bottom of chart with sum values.
# MaxNbOfExtraX is maximum number of rows shown in chart.
# MinHitExtraX is minimum number of hits required to be shown in chart.
#

# Example to report the 20 products the most ordered by "order.cgi" script
#ExtraSectionName1="Product orders"
#ExtraSectionCondition1="URL,\/cgi\-bin\/order\.cgi|URL,\/cgi\-bin\/order2\.cgi"
#ExtraSectionFirstColumnTitle1="Product ID"
#ExtraSectionFirstColumnValues1="QUERY_STRING,productid=([^&]+)"
#ExtraSectionFirstColumnFormat1="%s"
#ExtraSectionStatTypes1=PL
#ExtraSectionAddAverageRow1=0
#ExtraSectionAddSumRow1=1
#MaxNbOfExtra1=20
#MinHitExtra1=1



#-----------------------------------------------------------------------------
# INCLUDES
#-----------------------------------------------------------------------------

# You can include other config files using the directive with the name of the
# config file.
# This is particularly usefull for users who have a lot of virtual servers, so
# a lot of config files and want to maintain common values in only one file.
# Note that when a variable is defined both in a config file and in an
# included file, AWStats will use the last value read.
#

#Include ""
Maintained by Michael Forman at http://www.Michael-Forman.com.
$Id: mason.html,v 1.2 2003/12/27 18:11:35 forman Exp forman $


Copyright © 2008 Michael Forman