[default]
user = www-data
group = www-data
;chroot = /var/www{{apache_server_default_root|default('')}}
chdir = /
{% if php_fpm_socket %}
listen = /var/run/php{{ php_version_main }}-fpm.sock
{% else %}
listen = 127.0.0.1:{{ php_fpm_port|default(9999) }}
{% endif %}

; Process manager
pm = dynamic
pm.max_children = 10
pm.start_servers = 4
pm.min_spare_servers = 2
pm.max_spare_servers = 6
pm.max_requests = 2000
pm.status_path = /fpm-status

; Environment variables
env[HOSTNAME] = {{ inventory_hostname }}
env[PATH] = /usr/local/bin:/usr/sbin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp

; PHP settings
php_admin_value[doc_root] = /var/www{{apache_server_default_root|default('')}}
php_admin_value[upload_tmp_dir] = /tmp
php_admin_value[browscap] = {{ php_browscap }}
php_admin_value[conf_dir] = {{ php_conf_dir }}
php_admin_value[date_timezone] = {{ php_date_timezone }}
php_admin_value[display_errors] = {{ php_display_errors }}
php_admin_value[display_startup_errors] = {{ php_display_startup_errors }}
php_admin_value[error_reporting] = {{ php_error_reporting }}
php_admin_value[expose_php] = {{ php_expose_php }}
php_admin_value[filter.default] = {{ php_filter_default }}
php_admin_value[html_errors] = {{ php_html_errors }}
php_admin_value[log_errors] = {{ php_log_errors }}
php_admin_value[magic_quotes_gpc] = {{ php_magic_quotes_gpc }}
php_admin_value[max_execution_time] = {{ php_max_execution_time }}
php_admin_value[max_input_time] = {{ php_max_input_time }}
php_admin_value[max_input_vars] = {{ php_max_input_vars }}
php_admin_value[needs_oci8] = {{ php_needs_oci8 }}
php_admin_value[register_globals] = {{ php_register_globals }}
php_admin_value[register_long_arrays] = {{ php_register_long_arrays }}
php_admin_value[sendmail_path] = {{ php_sendmail_path }}
php_admin_value[session_cache_expire] = {{ php_session_cache_expire }}
php_admin_value[session_cookie_lifetime] = {{ php_session_cookie_lifetime }}
php_admin_value[session_gc_divisor] = {{ php_session_gc_divisor }}
php_admin_value[session_gc_maxlifetime] = {{ php_session_gc_maxlifetime }}
php_admin_value[short_open_tag] = {{ php_short_open_tag }}

php_admin_value[max_file_uploads] = {{ php_max_file_uploads }}
php_admin_value[memory_limit] = {{ php_memory_limit }}
php_admin_value[post_max_size] = {{ php_post_max_size }}
php_admin_value[upload_max_filesize] = {{ php_upload_max_filesize }}
