Merge pull request #4344 from Nuglif/fastcgi-backend-support

Add FastCGI backend support (#2982)
This commit is contained in:
Kubernetes Prow Robot 2019-07-31 11:20:14 -07:00 committed by GitHub
commit c8a3710fb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 938 additions and 6 deletions

View file

@ -1295,6 +1295,16 @@ stream {
{{ range $errCode := $location.CustomHTTPErrors }}
error_page {{ $errCode }} = @custom_{{ $location.DefaultBackendUpstreamName }}_{{ $errCode }};{{ end }}
{{ if (eq $location.BackendProtocol "FCGI") }}
include /etc/nginx/fastcgi_params;
{{ end }}
{{- if $location.FastCGI.Index -}}
fastcgi_index "{{ $location.FastCGI.Index }}";
{{- end -}}
{{ range $k, $v := $location.FastCGI.Params }}
fastcgi_param {{ $k }} "{{ $v }}";
{{ end }}
{{ buildProxyPass $server.Hostname $all.Backends $location }}
{{ if (or (eq $location.Proxy.ProxyRedirectFrom "default") (eq $location.Proxy.ProxyRedirectFrom "off")) }}
proxy_redirect {{ $location.Proxy.ProxyRedirectFrom }};