Add optional php to nginx
This commit is contained in:
parent
c35f717231
commit
c08ff3391f
5 changed files with 60 additions and 50 deletions
|
@ -2,6 +2,7 @@
|
|||
{
|
||||
imports = [
|
||||
./acme
|
||||
./php
|
||||
./user
|
||||
];
|
||||
|
||||
|
|
21
modules/system/services/server/nginx/php/default.nix
Normal file
21
modules/system/services/server/nginx/php/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue