Add optional php to nginx

This commit is contained in:
Bun 2025-07-12 02:56:43 -04:00
parent c35f717231
commit c08ff3391f
5 changed files with 60 additions and 50 deletions

View file

@ -2,6 +2,7 @@
{
imports = [
./acme
./php
./user
];

View file

@ -0,0 +1,21 @@
{ config, lib, ... }:
{
# Enable optional PHP socket
config = lib.mkIf config.services.nginx.enable {
services.phpfpm.pools.nginx = {
user = "nobody";
settings = {
"pm" = "dynamic";
"pm.max_children" = 75;
"pm.start_servers" = 10;
"pm.min_spare_servers" = 5;
"pm.max_spare_servers" = 20;
"pm.max_requests" = 500;
"listen.owner" = config.services.nginx.user;
"listen.group" = config.services.nginx.group;
"listen.mode" = "0660";
"catch_workers_output" = 1;
};
};
};
}