From f74c76589480b299f51c8df29ae39b335bc1167a Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Tue, 14 Feb 2017 17:02:30 +0100 Subject: [PATCH] d4science-infrastructure, library/roles/php-fpm: Fix the session paths. --- php-fpm/templates/php-fpm-pool.conf.j2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/php-fpm/templates/php-fpm-pool.conf.j2 b/php-fpm/templates/php-fpm-pool.conf.j2 index ea4be76a..00e8a7ab 100644 --- a/php-fpm/templates/php-fpm-pool.conf.j2 +++ b/php-fpm/templates/php-fpm-pool.conf.j2 @@ -279,7 +279,11 @@ php_admin_value[memory_limit] = {{ item.memory_limit | default('64M') }} php_admin_value[upload_max_filesize] = {{ item.upload_max_filesize | default('100M') }} ; Set session path to a directory owned by process user php_value[session.save_handler] = '{{ item.session_save_handler | default('files') }}' -php_value[session.save_path] = '{{ item.session_save_path | default('/var/lib/php/www') }}' +{% if phpfpm_session_prefix is defined %} +php_value[session.save_path] = '{{ phpfpm_session_prefix }}/{{ item.pool_name }}' +{% else %} +php_value[session.save_path] = '/var/lib/php/www' +{% endif %} {% if item.define_custom_variables is defined and item.define_custom_variables %} {% for php_var in phpfpm_php_variables %} php_value[{{ php_var.prop }}] = {{ php_var.value }}