PHP-FPM API

PHP-FPM pool management, OPcache, modules, configuration, and logs.

All endpoints are prefixed with /api/phpfpm. Admin only.


Pools & Status

MethodPathDescription
GET/phpfpmList pools
GET/phpfpm/statusFPM status
GET/phpfpm/versionPHP version
GET/phpfpm/globalGlobal config
GET/phpfpm/pool-statusPool status page
GET/phpfpm/opcacheOPcache stats
GET/phpfpm/modulesPHP modules
GET/phpfpm/iniphp.ini settings
GET/phpfpm/config-testTest config syntax

Pool Management

MethodPathDescription
GET/phpfpm/:namePool config
PUT/phpfpm/:nameEdit pool directive
GET/phpfpm/:name/logsPool access logs
GET/phpfpm/:name/slow-logSlow request logs

Service Control

MethodPathDescription
POST/phpfpm/restartRestart FPM
POST/phpfpm/reloadReload FPM

Response Formats

GET /phpfpm

{
  "pools": [
    { "name": "www", "pm": "dynamic", "maxChildren": 50, "startServers": 5, "status": "active" }
  ],
  "phpVersion": "8.3.6",
  "totalPools": 1,
  "totalMaxWorkers": 50
}

GET /phpfpm/opcache

{
  "enabled": true,
  "memoryUsage": { "used": 12345678, "free": 51234567, "percent": 19.4 },
  "hitRate": 98.7,
  "cachedScripts": 1234,
  "restarts": 0
}

GET /phpfpm/modules

{
  "modules": ["bcmath", "calendar", "ctype", "curl", "dba", ...],
  "total": 46
}

Part of NexusPanel API Reference

← Back to Documentation