ma nginx/euer.wiki: poolConfigs -> pools

This commit is contained in:
makefu 2019-10-15 14:26:50 +02:00
parent a08d9999f1
commit 667cb111a7
2 changed files with 31 additions and 31 deletions

View file

@ -118,23 +118,25 @@ let
access_log off;
'';
};
services.phpfpm.poolConfigs."${domain}" = ''
listen = ${socket}
user = nginx
group = nginx
pm = dynamic
pm.max_children = 32
pm.max_requests = 500
pm.start_servers = 2
pm.min_spare_servers = 2
pm.max_spare_servers = 5
listen.owner = nginx
listen.group = nginx
php_admin_value[error_log] = 'stderr'
php_admin_flag[log_errors] = on
env[PATH] = ${lib.makeBinPath [ pkgs.php ]}
catch_workers_output = yes
'';
services.phpfpm.pools."${domain}" = {
user = "nginx";
group = "nginx";
listen = socket;
settings = {
"pm" = "dynamic";
"pm.max_children" = 32;
"pm.max_requests" = 500;
"pm.start_servers" = 2;
"pm.min_spare_servers" = 2;
"pm.max_spare_servers" = 5;
};
extraConfig = ''
php_admin_value[error_log] = 'stderr'
php_admin_flag[log_errors] = on
env[PATH] = ${lib.makeBinPath [ pkgs.php ]}
catch_workers_output = yes
'';
};
services.phpfpm.phpOptions = ''
opcache.enable=1
opcache.enable_cli=1

View file

@ -23,20 +23,18 @@ let
in {
state = [ base-dir ];
services.phpfpm = {
# phpfpm does not have an enable option
poolConfigs = {
euer-wiki = ''
user = ${user}
group = ${group}
listen = ${fpm-socket}
listen.owner = ${user}
listen.group = ${group}
env[twconf] = ${base-cfg};
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pools.euer-wiki = {
inherit user group;
listen = fpm-socket;
config = {
"pm" = "dynamic";
"pm.max_children" = 5;
"pm.start_servers" = 2;
"pm.min_spare_servers" = 1;
"pm.max_spare_servers" = 3;
};
phpEnv.twconf = base-cfg;
extraConfig = ''
chdir = /
php_admin_value[error_log] = 'stderr'
php_admin_flag[log_errors] = on