tt-rss: read listen socket from pool
This allows to use a different socket. The configuration was tested on my server.
This commit is contained in:
parent
a8244c680a
commit
f636bb2016
@ -501,9 +501,10 @@ let
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
services.phpfpm.poolConfigs = mkIf (cfg.pool == "${poolName}") {
|
services.phpfpm.pools = mkIf (cfg.pool == "${poolName}") {
|
||||||
"${poolName}" = ''
|
"${poolName}" = {
|
||||||
listen = "${phpfpmSocketName}";
|
listen = "/var/run/phpfpm/${poolName}.sock";
|
||||||
|
extraConfig = ''
|
||||||
listen.owner = nginx
|
listen.owner = nginx
|
||||||
listen.group = nginx
|
listen.group = nginx
|
||||||
listen.mode = 0600
|
listen.mode = 0600
|
||||||
@ -517,6 +518,7 @@ let
|
|||||||
catch_workers_output = 1
|
catch_workers_output = 1
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# NOTE: No configuration is done if not using virtual host
|
# NOTE: No configuration is done if not using virtual host
|
||||||
services.nginx = mkIf (cfg.virtualHost != null) {
|
services.nginx = mkIf (cfg.virtualHost != null) {
|
||||||
@ -532,7 +534,7 @@ let
|
|||||||
locations."~ \.php$" = {
|
locations."~ \.php$" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
fastcgi_pass unix:${phpfpmSocketName};
|
fastcgi_pass unix:${config.services.phpfpm.pools.${cfg.pool}.listen};
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user