nixos-config/modules/system/services/server/nginx/php/default.nix
2025-07-12 02:56:43 -04:00

21 lines
579 B
Nix

{ 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;
};
};
};
}