roles/php5-fpm: Use template for pools
Each vhost has a separate pool. Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
parent
2afa1ef2f3
commit
0689153bd9
@ -10,7 +10,8 @@
|
|||||||
tags: php5-fpm
|
tags: php5-fpm
|
||||||
|
|
||||||
- name: Copy php5-fpm pool config
|
- name: Copy php5-fpm pool config
|
||||||
copy: src=www.conf dest=/etc/php5/fpm/pool.d/www.conf owner=root group=root mode=0644
|
template: src=pool.conf.j2 dest=/etc/php5/fpm/pool.d/{{ item.nginx_domain_name }}.conf owner=root group=root mode=0644
|
||||||
|
with_items: nginx_vhosts
|
||||||
notify: restart php5-fpm
|
notify: restart php5-fpm
|
||||||
tags: php5-fpm
|
tags: php5-fpm
|
||||||
|
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
; Start a new pool named 'www'.
|
{% set domain_name = item.nginx_domain_name %}
|
||||||
|
|
||||||
|
; Start a new pool named '{{ domain_name }}'.
|
||||||
; the variable $pool can we used in any directive and will be replaced by the
|
; the variable $pool can we used in any directive and will be replaced by the
|
||||||
; pool name ('www' here)
|
; pool name ('{{ domain_name }}' here)
|
||||||
[www]
|
[{{ domain_name }}]
|
||||||
|
|
||||||
; Per pool prefix
|
; Per pool prefix
|
||||||
; It only applies on the following directives:
|
; It only applies on the following directives:
|
||||||
@ -30,7 +32,7 @@ group = nginx
|
|||||||
; specific port;
|
; specific port;
|
||||||
; '/path/to/unix/socket' - to listen on a unix socket.
|
; '/path/to/unix/socket' - to listen on a unix socket.
|
||||||
; Note: This value is mandatory.
|
; Note: This value is mandatory.
|
||||||
listen = /var/run/php5-fpm.sock
|
listen = /var/run/php5-fpm-{{ domain_name }}.sock
|
||||||
|
|
||||||
; Set listen(2) backlog.
|
; Set listen(2) backlog.
|
||||||
; Default Value: 65535 (-1 on FreeBSD and OpenBSD)
|
; Default Value: 65535 (-1 on FreeBSD and OpenBSD)
|
Loading…
Reference in New Issue
Block a user