NetworkCoreWeb server logs

Apache HTTP Server access log

Request log written by mod_log_config in a format the site chooses: Common, Combined or custom, with the request time in the host's own offset.

01Location

  • Files named by CustomLog directives in the server or virtual-host configuration
  • A CustomLog may also write to a pipe, syslog or journald instead of a file

02Questions it answers

  • Which client address requested which URL, with which method and status, and how large was the response?
  • Which referring page and which user agent did the client present (Combined format)?
  • When did the server receive the request, and in which UTC offset is that time written?

03Format and versions

FormatPlain text, one line per request, shaped by a LogFormat string. Common Log Format is "%h %l %u %t \"%r\" %>s %b"; the Combined format adds "%{Referer}i" and "%{User-agent}i".
Applies toDirectives as in the current Apache HTTP Server manual for mod_log_config. Other web servers use different logging modules and defaults.

04Key fields

FieldWhat it tells you
%hRemote host. It is the IP address unless HostnameLookups is on, and modules such as mod_remoteip can change it.
%lRemote logname from identd; a dash unless mod_ident is present and IdentityCheck is on.
%uRemote user if the request was authenticated. It may be bogus when the status is 401.
%tTime the request was received, for example [18/Sep/2011:19:18:28 -0400]. The last number is the offset from GMT.
%rThe first line of the request.
%>sThe final status. Plain %s is the status of the original request when the request was redirected internally.
%bSize of the response in bytes, excluding HTTP headers; a dash in CLF when no bytes were sent.
%{Referer}i, %{User-agent}iValues of the named request headers. They are supplied by the client and can be set to anything.

05Timestamps

FieldEncodingNote
%tText date with numeric UTC offset, e.g. 18/Sep/2011:19:18:28 -0400By default the time is taken at the beginning of request processing. A format of %{end:...}t gives the time the entry is written instead, so read the LogFormat before comparing with other logs.
%{sec}t, %{msec}t, %{usec}tUnix seconds, milliseconds or microsecondsEpoch tokens that avoid the offset ambiguity; present only if the format uses them.

Decode raw values with the Timestamp decoder and convert local wall-clock times with the Local time to UTC.

06Examination workflow

  1. Collect every CustomLog and LogFormat line, plus the virtual-host layout, to know which file records which site and in which format.
  2. Convert each time to UTC using the offset written on the line, not the offset of your own workstation.
  3. If a proxy or load balancer sits in front, find out whether %h shows the proxy or the original client, and whether the original address is logged elsewhere.
  4. Treat Referer and User-agent as claims by the client, and use them to group requests rather than to identify a person.
  5. Corroborate with the application log, the error log (the %L log ID links the two) and any proxy or firewall log.

07Interpretation pitfalls

  • The log shows requests the server received, not what the person behind the client did next. A 200 status means the server answered; it does not show that the response was read.
  • The format is chosen by the administrator. Fields such as Referer, duration or the end-of-request time may simply not be recorded.
  • %b excludes HTTP headers, so it is not the number of bytes on the wire.
  • With internal redirects, %s and %>s differ, and %r may show the original rather than the final request.

09Sources

  1. Apache HTTP Server — mod_log_config (source of the manual page) The Apache Software Foundation (GitHub) · checked 2026-10-22

Contact and service requests

Contact us about examination services related to this page, support for expert witnesses, or collaboration. Please do not attach evidence files or personal data to your email.