Apache Log Configuration - Aster Analytics

Teradata Aster Analytics Foundation User Guide

Product
Aster Analytics
Release Number
6.21
Published
November 2016
Language
English (United States)
Last Update
2018-04-14
dita:mapPath
kiu1466024880662.ditamap
dita:ditavalPath
AA-notempfilter_pdf_output.ditaval
dita:id
B700-1021
lifecycle
previous
Product Category
Software

The Apache web server lets users specify the content and reporting conditions of the server access log. For example, the user can configure the server to report the remote host name and time of each request, and to report the requested path only when the page fails to open.

The Apache server configuration file contains the desired log format as the argument of either the LogFormat or CustomLog directive. LogFormat defines only a custom format. CustomLog defines both a custom format and a log file that has that format. The argument for each directive is a format string. In the format string, the symbol % precedes each request characteristic. For example, %v represents the canonical ServerName of the server serving the request. At logging time, v is replaced by the appropriate ServerName.

The following figure shows sample lines of an Apache server configuration file. For detailed information about custom log formats, see http://httpd.apache.org/docs/current/mod/mod_log_config.html.

Apache Server Configuration File Sample Lines
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
# If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referrer
LogFormat "%{User-agent}i" agent