summaryrefslogtreecommitdiffstats
path: root/lass/2configs/websites/util.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2019-10-10 11:10:50 +0200
committerlassulus <lassulus@lassul.us>2019-10-10 11:10:50 +0200
commitdfc4a42f69a6e499edfc9e0ef1a0a61f1ffe0bb7 (patch)
tree9257763aa0d0cc80077507ddd7702988aaea8986 /lass/2configs/websites/util.nix
parent405ffb8078078de2aa792ebe2acf1ec75417591d (diff)
l websites: use new phpfpm interface
Diffstat (limited to 'lass/2configs/websites/util.nix')
-rw-r--r--lass/2configs/websites/util.nix66
1 files changed, 35 insertions, 31 deletions
diff --git a/lass/2configs/websites/util.nix b/lass/2configs/websites/util.nix
index b973d680d..bffa1036b 100644
--- a/lass/2configs/websites/util.nix
+++ b/lass/2configs/websites/util.nix
@@ -171,22 +171,24 @@ rec {
access_log off;
'';
};
- services.phpfpm.poolConfigs."${domain}" = ''
- listen = /srv/http/${domain}/phpfpm.pool
- 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
- catch_workers_output = yes
- '';
+ services.phpfpm.pools."${domain}" = {
+ user = "nginx";
+ group = "nginx";
+ extraConfig = ''
+ listen = /srv/http/${domain}/phpfpm.pool
+ 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
+ catch_workers_output = yes
+ '';
+ };
};
serveWordpress = domains:
@@ -222,21 +224,23 @@ rec {
expires max;
'';
};
- services.phpfpm.poolConfigs."${domain}" = ''
- listen = /srv/http/${domain}/phpfpm.pool
- user = nginx
- group = nginx
- pm = dynamic
- pm.max_children = 25
- pm.start_servers = 5
- pm.min_spare_servers = 3
- pm.max_spare_servers = 20
- listen.owner = nginx
- listen.group = nginx
- php_admin_value[error_log] = 'stderr'
- php_admin_flag[log_errors] = on
- catch_workers_output = yes
- '';
+ services.phpfpm.pools."${domain}" = {
+ user = "nginx";
+ group = "nginx";
+ extraConfig = ''
+ listen = /srv/http/${domain}/phpfpm.pool
+ pm = dynamic
+ pm.max_children = 25
+ pm.start_servers = 5
+ pm.min_spare_servers = 3
+ pm.max_spare_servers = 20
+ listen.owner = nginx
+ listen.group = nginx
+ php_admin_value[error_log] = 'stderr'
+ php_admin_flag[log_errors] = on
+ catch_workers_output = yes
+ '';
+ };
};
}