l websites: use new phpfpm interface
This commit is contained in:
parent
405ffb8078
commit
dfc4a42f69
|
@ -171,22 +171,24 @@ rec {
|
||||||
access_log off;
|
access_log off;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
services.phpfpm.poolConfigs."${domain}" = ''
|
services.phpfpm.pools."${domain}" = {
|
||||||
listen = /srv/http/${domain}/phpfpm.pool
|
user = "nginx";
|
||||||
user = nginx
|
group = "nginx";
|
||||||
group = nginx
|
extraConfig = ''
|
||||||
pm = dynamic
|
listen = /srv/http/${domain}/phpfpm.pool
|
||||||
pm.max_children = 32
|
pm = dynamic
|
||||||
pm.max_requests = 500
|
pm.max_children = 32
|
||||||
pm.start_servers = 2
|
pm.max_requests = 500
|
||||||
pm.min_spare_servers = 2
|
pm.start_servers = 2
|
||||||
pm.max_spare_servers = 5
|
pm.min_spare_servers = 2
|
||||||
listen.owner = nginx
|
pm.max_spare_servers = 5
|
||||||
listen.group = nginx
|
listen.owner = nginx
|
||||||
php_admin_value[error_log] = 'stderr'
|
listen.group = nginx
|
||||||
php_admin_flag[log_errors] = on
|
php_admin_value[error_log] = 'stderr'
|
||||||
catch_workers_output = yes
|
php_admin_flag[log_errors] = on
|
||||||
'';
|
catch_workers_output = yes
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
serveWordpress = domains:
|
serveWordpress = domains:
|
||||||
|
@ -222,21 +224,23 @@ rec {
|
||||||
expires max;
|
expires max;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
services.phpfpm.poolConfigs."${domain}" = ''
|
services.phpfpm.pools."${domain}" = {
|
||||||
listen = /srv/http/${domain}/phpfpm.pool
|
user = "nginx";
|
||||||
user = nginx
|
group = "nginx";
|
||||||
group = nginx
|
extraConfig = ''
|
||||||
pm = dynamic
|
listen = /srv/http/${domain}/phpfpm.pool
|
||||||
pm.max_children = 25
|
pm = dynamic
|
||||||
pm.start_servers = 5
|
pm.max_children = 25
|
||||||
pm.min_spare_servers = 3
|
pm.start_servers = 5
|
||||||
pm.max_spare_servers = 20
|
pm.min_spare_servers = 3
|
||||||
listen.owner = nginx
|
pm.max_spare_servers = 20
|
||||||
listen.group = nginx
|
listen.owner = nginx
|
||||||
php_admin_value[error_log] = 'stderr'
|
listen.group = nginx
|
||||||
php_admin_flag[log_errors] = on
|
php_admin_value[error_log] = 'stderr'
|
||||||
catch_workers_output = yes
|
php_admin_flag[log_errors] = on
|
||||||
'';
|
catch_workers_output = yes
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue