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

@ -24,7 +24,8 @@ RUN clean-install \
COPY --chown=www-data:www-data . /
RUN cp /usr/local/openresty/nginx/conf/mime.types /etc/nginx/mime.types
RUN cp /usr/local/openresty/nginx/conf/mime.types /etc/nginx/mime.types \
&& cp /usr/local/openresty/nginx/conf/fastcgi_params /etc/nginx/fastcgi_params
RUN ln -s /usr/local/openresty/nginx/modules /etc/nginx/modules
# Add LuaRocks paths

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 }};