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:
log/APPNAME/APPNAME_nginx.error.log
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.
Field | Description |
---|---|
DATE | Date the error was logged. |
TIME | Time the error was logged. |
LOG_LEVEL | The priority of the log entry. See the Nginx log_level documentation for possible values. |
PROCESS_ID | Nginx process ID that handled the request. |
THREAD_ID | Nginx thread ID that handled the request. |
CONNECTION_ID | Nginx connection ID of the request. |
LOG_MESSAGE | Log 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.
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.
tail -n 100 log/APPNAME/APPNAME_nginx.error_ssl.log