Configuring HTTP Service Access Log Rotation
Use this page to enable and configure rotation for the access logs for the virtual servers. These logs are in the install_dir/domains/
domain_name/logs/access
directory and are named as follows:
virtual_server_name_access_log.yyyy-mm-dd.txt
Click Load Defaults to load the default values. To change the rotation properties for these logs, do the following:
- Check the File Rotation box to turn on file rotation. By default, file rotation is disabled.
- From the Rotation Policy combo box, choose one of the following:
time
(the default): The access logs will be rotated after a specified time.
size
: The logs will be rotated after they reach a specified size. Question: Has this been implemented? If you specify it, the server won’t start, and the rotation size limit attribute doesn’t show up in the access-log element of domain.xml.
on-demand
: The logs will be rotated when the user requests it. Question: How do you do this?
- In the Rotation Interval field, type a numeric value to specify the number of minutes between rotations of the access log. This field is valid only if you specified
time
as the Rotation Policy. The default is 1440 minutes.
- In the Rotation Size Limit field, type a numeric value to specify the size (in bytes) that the access log should reach in order to be rotated. This field is valid only if you specified
size
as the Rotation Policy. Question: Currently if I enable file rotation, the defaults are filled in for all except this field, since time is the default policy. But if I then click Load Defaults, an error appears because the size field is blank -- even though it is meaningless when time is the policy. This is a bug, right? Also, on PE if I try to set the rotation policy to size, I get an error when I restart the server.
- In the Rotation Suffix field, type a string value to specify the suffix to be added to the log file name after rotation. The default is
%YYYY;%MM;%DD;-%hh;h%mm;m%ss;s
.
- In the Format field, enter a string value to specify the format of the access log. Use the formats shown in Table 4-2. The default format is
%client.dns;%auth-user-name;%system.date;%request;%status;
%response.length;
.
Table 4-2 Token Values for Access Log Format
Data
|
Token
|
Client Host Name
|
%client.name;
|
Client DNS
|
%client.dns;
|
System Date
|
%datetime;
|
Full HTTP Request line
|
%request;
|
Status
|
%status;
|
Response Content Length
|
%response.length;
|
Referer Header
|
%header.referer;
|
User-agent
|
%header.user-agent;
|
HTTP Method
|
%http-method;
|
HTTP URI
|
%http-uri;
|
HTTP Query String
|
%query-str;
|
Http Protocol Version
|
%http-version;
|
Accept Header
|
%header.accept;
|
Date Header
|
%header.date;
|
If-Modified-Since Header
|
%header.if-mod-since;
|
Authorization Header
|
%header.auth;
|
Any header value (any is a valid header value; it is specified as a variable here) Question: could you clarify this?
|
%header.any;
|
Name of Authorized User
|
%auth-user-name;
|
Value of a Cookie
|
%cookie.value;
|
Virtual Server ID
|
%vs.id;
|
- Click Save to save your changes, or Load Defaults to return to the default settings.
Legal Notices