Apache access logs

The Apache access log (access.log) contains a list of requests for your application that have bypassed Varnish®. These requests include pages, theme files, and static media files.

For a list of the log files handled by Cloud Platform, including accessing these log files, log file retention, and their locations, see About Cloud Platform logging. You can also review information about how to streaming Apache log entries in real time from your browser.

Note for log streaming users

Acquia’s log forwarding feature adds information to the beginning of each line that is forwarded to an external service. For more information, see File formats in forwarded log files.

Parsing the log file

The following line is a representative example of the data written into your website’s Apache access log: - - [04/Jan/2017:23:20:38 +0000] "GET /contact_us HTTP/1.1" 404 10117 "-" " bot version 1.4 (" hosting_site=alphabeta pid=26731 request_time=10186417 forwarded_for="," request_id="v-00000zzz-d2d4-11e6-9bed-0aeea9eaf9af" location=""

Each of the items in the Apache access log is noted in the following table, along with its description:

Position Data Description
0 The remote host (client IP).
1 - The identity of the user determined by identd. Rarely used.
2 - The user name, determined by HTTP authentication.
3 [04/Jan/2017:23:20:38 +0000] The date and time the request was received by the backend infrastructure.
4 "GET /contact_us HTTP/1.1"

The REQUEST line from the client, containing three parts:

  • The method of the request (GET)
  • The path requested (/contact_us)
  • The HTTP protocol (1.1)
5 404 The HTTP status code sent from the infrastructure to the client. Production environments don’t display full information for HTTP 5xx status codes.
6 10117 The total size, in bytes, of the response to the client.
7 "-" The referrer, which is the page (none in this case) that provided the link to this page.
8 " bot version 1.4 (" The user-agent, or browser identification string, encased in quotation marks as many browser names have spaces in them.
9 The underlying virtual host matching the requested domain name.
10 The domain name for the request, which does not have to match the virtual host (vhost) name.
11 hosting_site=alphabeta The internal Acquia site name this request is for.
12 pid=26731 The process ID (pid) on the infrastructure that handled this request.
13 request_time=10186417 The time needed to serve the request, in microseconds (1/1000000 of a second).
14 forwarded_for=","

The full set of IP addresses tracked as “requester IP,” which will contain the IP addresses of the following if they are in use by the subscription:

  • Load balancer
  • ELB (Elastic Load Balancer)
  • Content Delivery Networks or Web Application Firewalls (WAFs) such as Edge)
15 request_id="v-00000zzz-d2d4-11e6-9bed-0aeea9eaf9af" A unique ID attached to this request by the load balancer, which appears in several Cloud Platform log files. For more information, see Using HTTP request IDs.
16 location="" The contents of the Location HTTP header.