configure pools, re-place domain var
This commit is contained in:
parent
70b01d503e
commit
9eaf3ecda9
17
1/play.yml
17
1/play.yml
@ -1,7 +1,10 @@
|
|||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
become: true
|
become: true
|
||||||
roles:
|
vars:
|
||||||
- nginx
|
domain: zz777.ru
|
||||||
- php
|
roles:
|
||||||
- mysql
|
- nginx
|
||||||
- webapps
|
- php
|
||||||
|
- mysql
|
||||||
|
- webapps
|
||||||
|
|
@ -61,7 +61,7 @@ server {
|
|||||||
fastcgi_param front_controller_active true;
|
fastcgi_param front_controller_active true;
|
||||||
fastcgi_send_timeout 1200;
|
fastcgi_send_timeout 1200;
|
||||||
fastcgi_read_timeout 1200;
|
fastcgi_read_timeout 1200;
|
||||||
fastcgi_pass unix:/run/php/php-fpm.sock;
|
fastcgi_pass unix:/run/php/php-cloud.sock;
|
||||||
fastcgi_intercept_errors on;
|
fastcgi_intercept_errors on;
|
||||||
fastcgi_request_buffering off;
|
fastcgi_request_buffering off;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ server {
|
|||||||
}
|
}
|
||||||
location ~ .*.php$ {
|
location ~ .*.php$ {
|
||||||
include /etc/nginx/fastcgi.conf;
|
include /etc/nginx/fastcgi.conf;
|
||||||
fastcgi_pass unix:/run/php/php-fpm.sock;
|
fastcgi_pass unix:/run/php/php-other.sock;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
}
|
}
|
||||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
||||||
|
@ -33,7 +33,7 @@ server {
|
|||||||
location ^~ /.well-known/acme-challenge { }
|
location ^~ /.well-known/acme-challenge { }
|
||||||
location ~ .*.php$ {
|
location ~ .*.php$ {
|
||||||
include /etc/nginx/fastcgi.conf;
|
include /etc/nginx/fastcgi.conf;
|
||||||
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
|
fastcgi_pass unix:/run/php/php-other.sock;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
}
|
}
|
||||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
||||||
|
@ -26,7 +26,7 @@ server {
|
|||||||
}
|
}
|
||||||
location ~ .*.php$ {
|
location ~ .*.php$ {
|
||||||
include /etc/nginx/fastcgi.conf;
|
include /etc/nginx/fastcgi.conf;
|
||||||
fastcgi_pass unix:/run/php/php-fpm.sock;
|
fastcgi_pass unix:/run/php/php-wiki.sock;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
}
|
}
|
||||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
---
|
---
|
||||||
domain: zz777.ru
|
# domain: zz777.ru
|
||||||
root: /var/www
|
root: /var/www
|
11
1/roles/php/files/pool.d/www.conf
Normal file
11
1/roles/php/files/pool.d/www.conf
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[{{item}}]
|
||||||
|
user = www-data
|
||||||
|
group = www-data
|
||||||
|
listen = /run/php/php-{{item}}.sock
|
||||||
|
listen.owner = www-data
|
||||||
|
listen.group = www-data
|
||||||
|
|
||||||
|
pm = static
|
||||||
|
pm.max_children = 4
|
||||||
|
php_admin_value[error_log] = /var/log/fpm-err.log
|
||||||
|
;php_value[max_execution_time] = 600
|
@ -3,3 +3,12 @@
|
|||||||
apt:
|
apt:
|
||||||
name: ['php-fpm', 'php-imagick', 'php-memcached', 'php-zip', 'php-mysql', 'php-gd', 'php-mbstring', 'php-xml']
|
name: ['php-fpm', 'php-imagick', 'php-memcached', 'php-zip', 'php-mysql', 'php-gd', 'php-mbstring', 'php-xml']
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
- name: Configure php-fpm pools
|
||||||
|
template:
|
||||||
|
src: files/pool.d/www.conf
|
||||||
|
dest: /etc/php/7.4/fpm/pool.d/{{ item }}.conf
|
||||||
|
loop:
|
||||||
|
- cloud
|
||||||
|
- wiki
|
||||||
|
- other
|
1
1/roles/php/vars/main.yml
Normal file
1
1/roles/php/vars/main.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
---
|
@ -12,7 +12,7 @@ Web:
|
|||||||
- [x] Тестовая (about) страница на домене xz777.ru
|
- [x] Тестовая (about) страница на домене xz777.ru
|
||||||
- [x] default_server ведет на тестовую страницу
|
- [x] default_server ведет на тестовую страницу
|
||||||
|
|
||||||
Для mediawiki и nextcloud свои php-fpm pool'ы
|
- [x] Для mediawiki и nextcloud свои php-fpm pool'ы
|
||||||
|
|
||||||
- [ ] Установить nextcloud
|
- [ ] Установить nextcloud
|
||||||
- [ ] Установить mediawiki
|
- [ ] Установить mediawiki
|
||||||
|
Loading…
Reference in New Issue
Block a user