PHP-FPM ini templates
Manage PHP-FPM templates for websites
The cpnginx uses the php.ini template file for managing the PHP variables. There are global FPM settings and per-user-based settings. Only the whm has the option to control the PHP variable. But if you need to allow the users to use the server setting of PHP values and avoid the Cpnginx custom fpm.ini values, please feel free to do the following customization.
Location of your custom Global FPM.ini template
The location of your custom FPM template file is /etc/cpnginx/templates/fpm/custom.conf . You can use the following sample fpm template configuration.
[${USER}]
user = ${USER}
group = ${USER}
listen = /run/${FPM}-fpm-${USER}.sock
listen.owner = ${USER}
listen.group = nobody
listen.mode = 0660
pm = ondemand
pm.max_children = 15
pm.max_requests = 200
pm.process_idle_timeout = 15
pm.max_spare_servers = 5
pm.min_spare_servers = 1
pm.start_servers = 0
pm.status_path = /status
php_admin_flag[log_errors] = ${log_errors}
php_admin_flag[allow_url_fopen] = ${allow_url_fopen}
php_admin_value[short_open_tag] = ${short_open_tag}
php_admin_value[file_uploads] = ${file_uploads}
php_admin_value[disable_functions] = ${disable_functions}
php_value[error_reporting] = ${error_reporting}
php_admin_value[memory_limit] = ${memory_limit}
php_admin_value[max_execution_time] = ${max_execution_time}
php_admin_value[max_input_time] = ${max_input_time}
php_admin_value[post_max_size] = ${post_max_size}
php_admin_value[upload_max_filesize] = ${upload_max_filesize}
php_admin_value[max_file_uploads] = ${max_file_uploads}
php_admin_value[error_log] = ${ERROR_LOG}
security.limit_extensions = .phtml .php .php3 .php4 .php5 .php6 .php7
After uploading the above template file, please make sure to run the following two commands from the server terminal.
nginxctl cleanfpm
nginxctl build vhosts