Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F7551461
D1251.id3222.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
D1251.id3222.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
@@ -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
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 29, 15:14 (6 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2615935
Default Alt Text
D1251.id3222.diff (1 KB)
Attached To
Mode
D1251: Provision nginx servers blocks for legacy PHP sites
Attached
Detach File
Event Timeline
Log In to Comment