Skip to content

Nginx app error logs

An app’s Nginx error log contains any errors and warnings from Nginx while serving requests.

View the logs

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

Log file location

There are two Nginx error log files for an app:

  • HTTP error log — An error log for requests received over HTTP. All apps have this log file.
  • HTTPS error log — An error log for requests received over HTTPS. Apps with SSL enabled have this log file.

Relative to the home directory of the app’s system user, the paths to an app’s Nginx error logs are:

Error log for HTTP requests
log/APPNAME/APPNAME_nginx.error.log
Error log for HTTPS requests
log/APPNAME/APPNAME_nginx.error_ssl.log

where APPNAME is the name of the app.

Log file format

The format of each log entry is:

DATE TIME [LOG_LEVEL] PROCESS_ID#THREAD_ID: *CONNECTION_ID LOG_MESSAGE

For example:

2025/03/06 18:06:39 [error] 1859207#0: *1379265 log message contents here, client: 203.0.113.0, server: example.com, request: "GET / HTTP/1.1", host: "example.com"

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

FieldDescription
DATEDate the error was logged.
TIMETime the error was logged.
LOG_LEVELThe priority of the log entry. See the Nginx log_level documentation for possible values.
PROCESS_IDNginx process ID that handled the request.
THREAD_IDNginx thread ID that handled the request.
CONNECTION_IDNginx connection ID of the request.
LOG_MESSAGELog message content.

Example commands

View recent Nginx error log entries

Show the most recent 100 lines in an app’s Nginx error log for HTTP requests.

Terminal window
tail -n 100 log/APPNAME/APPNAME_nginx.error.log

Show the most recent 100 lines in an app’s Nginx error log for HTTPS requests.

Terminal window
tail -n 100 log/APPNAME/APPNAME_nginx.error_ssl.log