Page MenuHomeDevCentral

D1252.id3224.diff
No OneTemporary

D1252.id3224.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
@@ -14,7 +14,7 @@
; </auto-generated>
[{{ user }}]
-listen = /var/run/web/{{ domain }}/php-fpm-pool.sock
+listen = /var/run/web/{{ fqdn }}/php-fpm-pool.sock
listen.owner = {{ user }}
listen.group = web
listen.mode = 0666
@@ -26,3 +26,7 @@
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_admin_flag[log_errors] = on
diff --git a/roles/webserver-legacy/php-sites/php-fpm.sls b/roles/webserver-legacy/php-sites/php-fpm.sls
--- a/roles/webserver-legacy/php-sites/php-fpm.sls
+++ b/roles/webserver-legacy/php-sites/php-fpm.sls
@@ -30,7 +30,7 @@
# Configuration : pools
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-{% for domain, site in pillar['web_php_sites'].iteritems() %}
+{% for fqdn, site in pillar['web_php_sites'].iteritems() %}
php-fpm_pool_{{ site['user'] }}:
file.managed:
@@ -38,9 +38,17 @@
- source: salt://roles/webserver-legacy/php-sites/files/php-fpm-pool.conf
- template: jinja
- context:
- domain: {{ domain }}
+ fqdn: {{ fqdn }}
+ domain: {{ site['domain' ]}}
+ subdomain: {{ site['subdomain' ]}}
user: {{ site['user' ]}}
+/var/log/www/{{ site['domain' ]}}/{{ site['subdomain' ]}}-php.log:
+ file.managed:
+ - user: {{ site['user'] }}
+ - group: web
+ - chmod: 640
+
{% endfor %}
# -------------------------------------------------------------

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 07:39 (17 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259747
Default Alt Text
D1252.id3224.diff (1 KB)

Event Timeline