Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3715341
D1486.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D1486.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 6, 05:11 (12 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2231211
Default Alt Text
D1486.diff (1 KB)
Attached To
Mode
D1486: Create individual PHP session directories per php-fpm user
Attached
Detach File
Event Timeline
Log In to Comment