Skip to content

Apache app access logs

An app’s Apache access log contains records of every request for that app received by Apache along with information about the response sent by Apache.

For requests that Apache proxies to PHP-FPM, the status code in the log entry will be the status code set by the app’s PHP code that handled the request.

View the logs

An app’s Apache access logs can be viewed from within the ServerPilot dashboard or through SSH.

Log file location

Relative to the home directory of the app’s system user, the path to an app’s Apache access log is:

log/APPNAME/APPNAME_apache.access.log

where APPNAME is the name of the app.

Log file format

The format of each log entry is:

IP_ADDRESS - AUTH_USER [DATE_TIME] "REQUEST_METHOD REQUEST_URI HTTP_VERSION" RESPONSE_CODE CONTENT_LENGTH

For example:

80.82.77.202 - - [06/Mar/2025:10:10:31 -0500] "GET / HTTP/1.0" 200 3403

The fields in each log entry are described in the following table.

FieldDescription
IP_ADDRESSIP address of the client that made the request.
AUTH_USERUser name from the Authorization: Basic ... header or - if not present.
DATE_TIMEDate and time the request was received.
REQUEST_METHODRequest method such as GET or POST.
REQUEST_URIRequest path and query string before processing by Apache RewriteRule directives.
HTTP_VERSIONAlways HTTP/1.0 regardless of the HTTP version of the original request. See the app’s Nginx access logs for the original request’s HTTP version.
RESPONSE_CODEStatus code of the response such as 200 or 404.
CONTENT_LENGTHSize in bytes of the response, excluding HTTP headers. For zero-length responses, the value will be - rather than 0.

Example commands

View recent Apache access log entries

Show the most recent 100 lines in an app’s Apache access log.

Terminal window
tail -n 100 log/APPNAME/APPNAME_apache.access.log