Update PHP-FPM directives and pool options

This function configures the PHP INI directives and pool options for a system's or domain's PHP-FPM configuration.

Important:

When you disable the Web Server role, the system disables this function.

Warning:

We strongly recommend that you only activate Apache PHP-FPM if your server has at least 2 GB of RAM available, or at least 30 MB of RAM per domain. If you enable PHP-FPM on a server with less than the required RAM, your server may experience severe performance issues.

SecurityBasicAuth
Request
Request Body schema: application/json
required
required
Array of objects

An array of objects containing the PHP-FPM configuration values to validate or update.

domain
string
Default: ""

A blank value or domain name whose PHP-FPM configuration you wish to set.

validate_only
boolean
Default: false

Whether the function request is for validation or to update the settings.

  • true - Only validate the configuration.
  • false - Validate and update the configuration.
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
post/php_fpm_config_set
Request samples
application/json
{
  • "config": [
    • {
      • "base_flag_name": "error_reporting",
      • "trinary_admin_value": 1,
      • "value": "E_ALL & ~E_NOTICE"
      },
    • {
      • "base_flag_name": "pm_max_children",
      • "trinary_admin_value": 0,
      • "value": "10"
      }
    ]
}
Response samples
application/json
{
  • "metadata": {
    • "command": "php_fpm_config_set",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}