; {{ ansible_managed }} [www] ;prefix = /path/to/pools/$pool user = www-data group = www-data listen = /run/php/{{ apache_phpfpm_php }}-fpm.sock listen.owner = www-data listen.group = www-data listen.mode = 0660 ;listen.allowed_clients = 127.0.0.1 ; process.priority = -19 pm = dynamic pm.max_children = {{ apache_phpfpm_max_workers }} pm.start_servers = 3 pm.min_spare_servers = 2 pm.max_spare_servers = 7 ;pm.process_idle_timeout = 10s pm.max_requests = {{ apache_phpfpm_max_requests | default(50000) }} pm.status_path = /_fpm/status ping.path = /_fpm/ping ping.response = pong ;access.log = /var/log/{{ apache_phpfpm_php }}-fpm.$pool.access.log ;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" ;slowlog = /var/log/{{ apache_phpfpm_php }}-fpm.$pool.slow.log ;request_slowlog_timeout = 10s ;request_terminate_timeout = 0 ;rlimit_files = 1024 ;rlimit_core = 0 ;chroot = chdir = / ;catch_workers_output = yes ;clear_env = no ;security.limit_extensions = .php .php3 .php4 .php5 .php7 ;env[HOSTNAME] = $HOSTNAME ;env[PATH] = /usr/local/bin:/usr/bin:/bin ;env[TMP] = /tmp ;env[TMPDIR] = /tmp ;env[TEMP] = /tmp ; Additional php.ini defines, specific to this pool of workers. These settings ; overwrite the values previously defined in the php.ini. The directives are the ; same as the PHP SAPI: ; php_value/php_flag - you can set classic ini defines which can ; be overwritten from PHP call 'ini_set'. ; php_admin_value/php_admin_flag - these directives won't be overwritten by ; PHP call 'ini_set' ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. ; Defining 'extension' will load the corresponding shared extension from ; extension_dir. Defining 'disable_functions' or 'disable_classes' will not ; overwrite previously defined php.ini values, but will append the new value ; instead. ; Note: path INI options can be relative and will be expanded with the prefix ; (pool, global or /usr) {% for key, value in apache_phpfpm_php_admin_settings|dictsort %} {% if value in (True,False) %} php_admin_flag[{{ key }}] = {{ 'on' if value else 'off' }} {% else %} php_admin_value[{{ key }}] = {{ value }} {% endif %} {% endfor %} {% for key, value in apache_phpfpm_php_settings|dictsort %} {% if value in (True,False) %} php_flag[{{ key }}] = {{ 'on' if value else 'off' }} {% else %} php_value[{{ key }}] = {{ value }} {% endif %} {% endfor %}