Page MenuHomeDevCentral

D1486.id.diff
No OneTemporary

D1486.id.diff

diff --git a/roles/webserver-legacy/php-sites/files/php-fpm-pool.conf b/roles/webserver-legacy/php-sites/files/php-fpm-pool.conf
--- a/roles/webserver-legacy/php-sites/files/php-fpm-pool.conf
+++ b/roles/webserver-legacy/php-sites/files/php-fpm-pool.conf
@@ -33,6 +33,9 @@
php_flag[display_startup_errors] = {{ display_errors }}
php_admin_flag[log_errors] = on
+; Don't flood /tmp (T417)
+php_value[session.save_path] = /var/tmp/php/sessions/{{ fqdn }}
+
{%- for key, value in env.items() %}
env["{{ key }}"] = {{ value }}
{%- endfor -%}
diff --git a/roles/webserver-legacy/php-sites/files/php.ini b/roles/webserver-legacy/php-sites/files/php.ini
--- a/roles/webserver-legacy/php-sites/files/php.ini
+++ b/roles/webserver-legacy/php-sites/files/php.ini
@@ -23,7 +23,3 @@
[Pdo_mysql]
pdo_mysql.default_socket = /var/run/mysqld/mysqld.sock
-
-[Session]
-; Don't flood /tmp (T417)
-session.save_path = "/var/tmp/php/sessions"
diff --git a/roles/webserver-legacy/php-sites/php.sls b/roles/webserver-legacy/php-sites/php.sls
--- a/roles/webserver-legacy/php-sites/php.sls
+++ b/roles/webserver-legacy/php-sites/php.sls
@@ -16,7 +16,7 @@
- source: salt://roles/webserver-legacy/php-sites/files/php.ini
# -------------------------------------------------------------
-# Session directory
+# Sessions directories
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/var/tmp/php:
@@ -28,3 +28,10 @@
file.directory:
- mode: 1770
- group: web
+
+{% for domain, site in pillar['web_php_sites'].items() %}
+/var/tmp/php/sessions/{{ domain }}:
+ file.directory:
+ - mode: 0700
+ - user: {{ site['user']}}
+{% endfor %}

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 10:42 (15 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2312312
Default Alt Text
D1486.id.diff (1 KB)

Event Timeline