site_logs
Tail nginx or Apache access and error logs directly to debug site issues such as 404 errors, permission problems, or PHP-FPM failures.
Instructions
Tail a site's nginx/apache access or error log — no SSH needed. Maps to GET /api/sites/{site_id}/log/{lines}/{type}. Use type=frontend_error to debug 404/permission/realpath problems (nginx), backend_error for PHP-FPM/Apache app errors. FastPanel quirk: this endpoint returns the log tail inside an 'errors' JSON field and responds with HTTP 400 even on success — an empty log shows as '\n', a missing file shows a 'Path … not exists' message. This tool normalises that: the log text is always returned under log, and 400 is not treated as a failure. Log files live at /data/logs/-.log.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | frontend_* = nginx, backend_* = PHP-FPM/Apache; *_error for diagnostics, *_access for traffic | frontend_error |
| lines | No | Number of trailing lines to return | |
| site_id | Yes | Site id from sites_list |