From 5f4e77b6e718f30dad8311e18f05f815309b7b9a Mon Sep 17 00:00:00 2001 From: Nicolas Duchon Date: Mon, 29 Jul 2024 18:15:04 +0200 Subject: [PATCH] fix: use fastcgi.conf on alpine and fastcgi_params on debien --- nginx.tmpl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nginx.tmpl b/nginx.tmpl index 07e1314..bb3b4aa 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -264,8 +264,14 @@ include uwsgi_params; uwsgi_pass {{ trim $proto }}://{{ trim $upstream }}; {{- else if eq $proto "fastcgi" }} - root {{ trim .VhostRoot }}; + {{- if (exists "/etc/nginx/fastcgi.conf") }} include fastcgi.conf; + {{- else if (exists "/etc/nginx/fastcgi_params") }} + include fastcgi_params; + {{- else }} + # neither /etc/nginx/fastcgi.conf nor /etc/nginx/fastcgi_params found, fastcgi won't work + {{- end }} + root {{ trim .VhostRoot }}; fastcgi_pass {{ trim $upstream }}; {{- if ne $keepalive "disabled" }} fastcgi_keep_conn on;