migrate phpfpm to unix sockets

This commit is contained in:
Daniel Frank 2019-11-29 20:48:13 +01:00
parent 54f9a24a1c
commit ed07963d09
Signed by: tokudan
GPG key ID: 063CCCAD04182D32
2 changed files with 2 additions and 4 deletions

View file

@ -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 = ''

View file

@ -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 = ''