Back to HTTPServer Main Index

Log Settings Help Index


Log to File

Enables or disables logging.

Log File

Specify the name of the logfile here.

Access Logger

Currently, two loggers are implemented, which generate different output format.

Apache Logfile Format

The logger can be configured to generate on of the two well known standard formats, "NCSA" and "CLF", or a custom defined format.
See the CustomLog directive of the apache mod_log_config.
See also http://httpd.apache.org

To use a logfile analyzer, we recommend using the "NCSA" format.

Apache Format directives ("%"-placeholders)

An apache log entry is a line (in ascii) which is specified by a format string, where %-directives are macro-expanded according to the following table:
%a Remote IP-address
%A Local IP-address
%B Bytes sent, excluding HTTP headers
%b Bytes sent, excluding HTTP headers. Like %B but '-' rather than a '0' when no bytes are sent (In CLF format)
%c Connection status when response was completed.
'X' = connection aborted before the response completed.
'+' = connection may be kept alive after the response is sent.
'-' = connection will be closed after the response is sent
%{FOOBAR}e The contents of the environment variable FOOBAR
%f Filename
%h Remote host
%H The request protocol
%{Foobar}i The contents of Foobar: header line(s) in the request
sent to the server
%l Remote logname (from identd, if supplied)
%m The request method
%{Foobar}n The contents of note Foobar from another module
%{Foobar}o The contents of Foobar: header line(s) in the reply
%p The canonical Port of the server serving the request
%P The process ID of the child that serviced the request
%q The query string (prepended with a ? if a query string exists, otherwise an empty string)
%r First line of request
%s Status. For requests that got internally redirected,
this is the status of the *original* request.
"%>s" for the last status
%t Time, in common log format time format (standard english format)
%{format}t The time, in the form given by format,
which should be in strftime(3) format. (potentially localized)
%T The time taken to serve the request, in seconds
%u Remote user (from auth; may be bogus if return status (%s) is 401)
%U The URL path requested, not including any query string
%v The canonical ServerName of the server serving the request
%V The server name according to the UseCanonicalName setting

Automatic LogFile Analyzis

For automatic logFile analyzis, you should setup a "cron" (see Unix manuals) job, which executes your preferred analyzer (say) every midnight.
These programs generate their output in HTML-format; create a directory to hold the output and specify this directory in the cron-command line.

To provide web access to these logs, configure a fileService on the above output directory, and define the logFiles index document (typically: "index.html") as default file.

Interfacing awstats

Our own server uses awstats to generate access statistics from the logfile.
We have set up the following cron job:
    23 0-23 * * * cd webServerData/awstats; awstats_buildstaticpages.pl -config=8080 -update
which generates the awstat pages every night.
In addition, a fileService is configured under the "/awstats" linkName to service the awstats output.

Copyright © 2003 eXept Software AG, all rights reserved


Doc $Revision: 1.4 $ $Date: 1997/08/07 15:06:09 $