From ed07963d091a94e74010421f9ad77a4045315e4d Mon Sep 17 00:00:00 2001 From: Daniel Frank Date: Fri, 29 Nov 2019 20:48:13 +0100 Subject: [PATCH] migrate phpfpm to unix sockets --- postfixadmin.nix | 3 +-- roundcube.nix | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/postfixadmin.nix b/postfixadmin.nix index 8b4b331..02e7e52 100644 --- a/postfixadmin.nix +++ b/postfixadmin.nix @@ -44,7 +44,7 @@ in # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini fastcgi_split_path_info ^(.+\.php)(/.+)$; # With php5-cgi alone: - fastcgi_pass ${phpfpmHostPort}; + fastcgi_pass unix:${config.services.phpfpm.pools."${phppoolName}".socket}; fastcgi_index index.php; fastcgi_param GATEWAY_INTERFACE CGI/1.1; fastcgi_param SERVER_SOFTWARE nginx; @@ -82,7 +82,6 @@ in ''; }; services.phpfpm.pools."${phppoolName}" = { - listen = phpfpmHostPort; user = "${pfaUser}"; group = "${pfaGroup}"; extraConfig = '' diff --git a/roundcube.nix b/roundcube.nix index 4256d2e..acd129f 100644 --- a/roundcube.nix +++ b/roundcube.nix @@ -57,7 +57,7 @@ in return 404; } - fastcgi_pass ${config.variables.roundcubePhpfpmHostPort}; + fastcgi_pass unix:${config.services.phpfpm.pools."${poolName}".socket}; fastcgi_index index.php; fastcgi_param QUERY_STRING $query_string; @@ -107,7 +107,6 @@ in ''; }; services.phpfpm.pools."${poolName}" = { - listen = config.variables.roundcubePhpfpmHostPort; user = "${config.variables.roundcubeUser}"; group = "${config.variables.roundcubeUser}"; extraConfig = ''