Besides offering a compact synopsis, a number of tools exist to help you analyze common-log files. Furthermore, as an adjunct to the common-log audit file, SREhttp/2 can also record the browser used by each request (as well as the referer) in seperate log files.
This document discusses how to modify the LOGS.CFG configuration file. LOGS.CFG (which should be in the SREHTTP2\CFG directory) contains the configuration options for these three log files. These options include the host-specific filenames for these log files, audit-suppression instructions, and a few display options.
LOGS.CFG is a general configuration file -- its values are used for all hosts (that is, there is no differentiation between hosts that are defined as superceding or non-superceding). In addition, it can not be changed on-the-fly; you have to restart SRE2003 for its changes to take effect.
ADD_HOSTNICKNAMES | add the Host-nickname to common-log entries |
---|---|
APACHE_MODE | Select format for Browser and Referer logs |
BROWSERLOG BROWSERLOG.hostn |
Default browser log file Browser log file for the "hostn" host. |
COMMONLOG COMMONLOG.hostn |
Default common-log file Common-log file for the "hostn" host (hostn is a host-nickname)> |
COMBINEDLOG COMBINEDLOG.hostn |
Default combined (common/referer/browser) log file Cominbedlog file for the "hostn" host. |
FORCE_REFERER | Use a " - " when no referer request header is available |
LOGFILE_MAXSIZE | rename log files once they get to this size |
NOOPTIONS | Do not record the portion of the request selector following the ? |
NOHTTP | Do not record the HTTP/1.0 portion of the request string |
NOCODES | List of "return codes" and "http methods" to not record. |
NOUSER | List of IP addresses, and SREhttp/2 "usernames", to not record |
NOREFERER | List of IP addresses to not record in REFERER.LOG (COMMON, COMBINED and BROWSER logs do NOT pay attention to this parameter). |
NOURL | Rquest selectors to not record |
DISPLAY | Display log entries in PMPRINTF window or SRE2003 status screen |
REFERERLOG REFERERLOG.hostn |
Default referer log file Referer log file for the "hostn" host. |
You should set these stem variable to equal filenames. If you use a relative file name (i.e.; FOO.BAR or DIR1\FOO.BAR), the file is assumed to be relative to the SREHTTP2\LOG directory.
If you do not want to record information to a common-log file, then set COMMONLOG=0. Or, COMMONLOG.HOSTN=0 to not record common-log information for requests to the HOSTN host.
Similarly, the COMBINEDLOG, BROWSERLOG and REFERERLOG variables are treated the same way. For example, to suppress the REFERERLOG, set REFERERLOG=0.
Example | COMMONLOG=COMMON.LOG COMMONLOG.ZOO=D:\CIRCUS\WWW\COMMON.LOG |
ADD_HOSTNICKNAMES | Add a host-nickname to the request portion of a log entry.
Note that this is not standard practice. Also note that if you've specified unique
log files for each host (and for each log file), then adding a host-nickname is
not particularly useful.
| ||||
---|---|---|---|---|---|
APACHE_MODE |
If APACHE_MODE=1, then the referer and browser log's are written using
an "Apache" mode (that is, something similar to what Apache server's write).
If APACHE_MODE=0, then a "GoHTTP" mode is used.
For example: APACHE_MODE (browser and referer logs): [14/Mar/1996:17:45:08] Mozilla/2.0 (X11; I; HP-UX A.09.05 9000/735) [14/Mar/1996:17:48:10] http://guide-p.infoseek.com/Titles -> /~sret1/analog/ GoHTTP: [03/Jun/1997:19:35:16 -0500] DAL40-29.PPP.IADFW.NET Mozilla/2.02E (OS/2; I) [2/Mar/1997:18:23:37 -0500] "/imgs/srefiltr.gif" http://ship.float.net/ |
||||
FORCE_REFERER | If FORCE_REFERER=1, then in cases where there is no referer, a " - " is used. | ||||
LOGFILE_MAXSIZE | LOGFILE_MAXSIZE is used to limit the size of the LOG files. Once a log file exceeds this
size (as specified in Kbytes), then it will be renamed (using .001, .002, etc.). The renamed files
will be moved to the SREHTTP2\LOG\OLD directory.
| ||||
NOOPTIONS |
If NOOPTIONS=1, then the portion of the request selector following a ?
will not be included. Since this can be quite long (as when you are
using the GET method in an HTML FORM), inclusion of this information can
lead to very long (and hard to read) entries.
For example:
given a request for:
|
||||
NOHTTP | Technically, a request string should end with the HTTP version. Since this is not necessarily interesting, and since it's not clear that the common-log format requires this information, you can suppress this portion of the request string by setting NOHTTP=1. | ||||
NOCODES | NOCODES should contain a space delimited list of 3 digit
return status codes, and http-methods, that you do not want
to record. If the response code, or the request method, matches one of these NOCODES, then none of the log files are written to.
|
||||
NOUSER | NOUSER entries should contain a space delimited list of numeric IP addresses,
or domain names. Requests from these clients will not be to logged.
You can also contain "usernames" (from SREhttp/2's USERS.CFG
username/password database) -- requests from these usernames will not
be recorded. One sensible use of this is to include the webmaster's IP address (since you probably don't care about requests you make to yourself), as well as the "usernames" of the various SUPERUSERs.
Example: Note that ADMINX is a possible username (possibly of a user with SUPERUSER privileges).
|
||||
NOREFERER | This should contain a space delimited list of IP addresses and domain names
that you do NOT wish to record in the REFERER.LOG file.
That is, requests that were refered from these addresses will NOT be
recorded in REFERER.LOG. However, these requests WILL be recorded in the
common.log, combined.log, and browser.log files.
Example:
|
||||
NOURL | The NOURL entries (there can be more than one)
should contain URLs to not record. That is, if a request
selector matches one of these URLs, it will NOT be recorded.
For example: NOURL = IMGS/* NOURL = BORING/TEDIOUS.HTMThe preceding examples will be used for all requests (to any host). Alternatively, you can include a host-nickname: NOURL = DEFAULT:/IMGS/* NOURL = ZOO:/BORING/TEDIOUS.HTM
|
||||
DISPLAY | Use DISPLAY to also display the common-log entry on screen.
|
If you choose to use the default LOGS.CFG file, log information will be written to the following log files in the SREHTTP2\LOG directory.