HTTP Delivery Logs

Plain HTML / Printer friendly.Plain HTML / Printer friendly.

Sometimes, the raw HTTP delivery logs from Edge servers can serve as an audit trail.

In this section, configurations can be set to allow for FTP delivery of these HTTP delivery logs. Note that the FTP server has to be set up beforehand.

The syslog delivery method can be used too. Simply change the selector from FTP to Syslog and fill out the IP address of the syslog server, its port, and the transport type of UDP or TCP.

The logs are cut and transfer attempts made once an hour. But you may restrict the hours of the day that logs are transferred, for instance during off peak or low traffic times.

In addition, the logfile line format can be customized. These settings are disabled by default and must be enabled.

Log Format

The log format is in described in the nginx wiki too.

VariableDescription
$hostVirtual host name (e.g. example.com)
$remote_addrClient IP
$remote_userClient HTTP username
$time_localRequest time
$requestThe request
$statusHTTP status code
$bytes_sentBytes sent (including header)
$bytes_body_sentBytes sent (excluding header)
$http_refererHTTP Referer header
$http_user_agentHTTP User Agent header
$http_cookieHTTP Cookie header
$request_timeDuration to serve this request to the client  (in ms)
$upstream_response_timeDuration to download this request from the origin (in seconds)
$upstream_cache_statusCache status (e.g. HIT, MISS, STALE, UPDATING, EXPIRED)
$geoip_country_code2-letter country code (e.g. US, AU)
$server_addrIP of the server that processed this request

The default log format is $host $remote_addr - $remote_user [$time_local] "$request" $status $bytes_sent "$http_referer" "$http_user_agent", corresponding to the Apache combined format with virtual host in front.

Example of a log: -

$host = mydomain.com
$remote_addr =
$request_time = 23
$ =
$upstream_cache_status =
$geoip_country_code = US
$server_addr = 123.456.789.012