Page MenuHomeDevCentral

No OneTemporary

diff --git a/roles/webserver-legacy/php-sites/files/php-fpm-pool.conf b/roles/webserver-legacy/php-sites/files/php-fpm-pool.conf
index e3e31f1..47d5725 100644
--- a/roles/webserver-legacy/php-sites/files/php-fpm-pool.conf
+++ b/roles/webserver-legacy/php-sites/files/php-fpm-pool.conf
@@ -1,38 +1,41 @@
; -------------------------------------------------------------
; php-fpm pool configuration
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; Project: Nasqueron
; License: Trivial work, not eligible to copyright
; Source file: roles/webserver-legacy/php-sites/files/php-fpm-pool.conf
; -------------------------------------------------------------
;
; <auto-generated>
; This file is managed by our rOPS SaltStack repository.
;
; Changes to this file may cause incorrect behavior
; and will be lost if the state is redeployed.
; </auto-generated>
[{{ user }}]
listen = /var/run/web/{{ fqdn }}/php-fpm.sock
listen.owner = {{ user }}
listen.group = web
listen.mode = 0666
user = {{ user }}
group = web
pm = ondemand
pm.max_children = 10
pm.process_idle_timeout = 10s
pm.max_requests = 200
catch_workers_output = yes
php_admin_value[error_log] = /var/log/www/{{ domain }}/{{ subdomain }}-php.log
php_flag[display_errors] = {{ display_errors }}
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
index 3cc22d3..62cbc60 100644
--- a/roles/webserver-legacy/php-sites/files/php.ini
+++ b/roles/webserver-legacy/php-sites/files/php.ini
@@ -1,29 +1,25 @@
; -------------------------------------------------------------
; PHP configuration
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; Project: Nasqueron
; License: Trivial work, not eligible to copyright
; Source file: roles/webserver-legacy/php-sites/files/php.ini
; -------------------------------------------------------------
;
; <auto-generated>
; This file is managed by our rOPS SaltStack repository.
;
; Changes to this file may cause incorrect behavior
; and will be lost if the state is redeployed.
; </auto-generated>
[Date]
; Place de la bastille, Paris
date.default_latitude = 48.853139
date.default_longitude = 2.369111
[MySQLi]
mysqli.default_socket = /var/run/mysqld/mysqld.sock
[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
index da11470..6ac3b2e 100644
--- a/roles/webserver-legacy/php-sites/php.sls
+++ b/roles/webserver-legacy/php-sites/php.sls
@@ -1,30 +1,37 @@
# -------------------------------------------------------------
# Salt — Provision PHP websites — php-fpm pools
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
{% from "map.jinja" import dirs with context %}
# -------------------------------------------------------------
# PHP global configuration
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ dirs.etc }}/php.ini:
file.managed:
- source: salt://roles/webserver-legacy/php-sites/files/php.ini
# -------------------------------------------------------------
-# Session directory
+# Sessions directories
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/var/tmp/php:
file.directory:
- mode: 1770
- group: web
/var/tmp/php/sessions:
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/x-diff
Expires
Sat, Jul 4, 03:12 (1 d, 4 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3882065
Default Alt Text
(4 KB)

Event Timeline