diff --git a/nginx.conf.sigil b/nginx.conf.sigil index 486afbb..6ff07fa 100644 --- a/nginx.conf.sigil +++ b/nginx.conf.sigil @@ -4,7 +4,6 @@ {{ $listen_port := index $port_map_list 1 }} {{ $upstream_port := index $port_map_list 2 }} -{{ if eq $scheme "http" }} server { listen [::]:{{ $listen_port }}; listen {{ $listen_port }}; @@ -50,7 +49,7 @@ server { internal; } } -{{ else if eq $scheme "https"}} + server { listen [::]:{{ $listen_port }} ssl {{ if eq $.HTTP2_SUPPORTED "true" }}http2{{ else if eq $.SPDY_SUPPORTED "true" }}spdy{{ end }}; listen {{ $listen_port }} ssl {{ if eq $.HTTP2_SUPPORTED "true" }}http2{{ else if eq $.SPDY_SUPPORTED "true" }}spdy{{ end }}; @@ -113,42 +112,6 @@ server { internal; } } -{{ else if eq $scheme "grpc"}} -{{ if eq $.GRPC_SUPPORTED "true"}}{{ if eq $.HTTP2_SUPPORTED "true"}} -server { - listen [::]:{{ $listen_port }} http2; - listen {{ $listen_port }} http2; - {{ if $.NOSSL_SERVER_NAME }}server_name {{ $.NOSSL_SERVER_NAME }}; {{ end }} - access_log {{ $.NGINX_LOG_ROOT }}/{{ $.APP }}-access.log; - error_log {{ $.NGINX_LOG_ROOT }}/{{ $.APP }}-error.log; - location / { - grpc_pass grpc://{{ $.APP }}-{{ $upstream_port }}; - } - include {{ $.DOKKU_ROOT }}/{{ $.APP }}/nginx.conf.d/*.conf; -} -{{ end }}{{ end }} -{{ else if eq $scheme "grpcs"}} -{{ if eq $.GRPC_SUPPORTED "true"}}{{ if eq $.HTTP2_SUPPORTED "true"}} -server { - listen [::]:{{ $listen_port }} ssl http2; - listen {{ $listen_port }} ssl http2; - {{ if $.NOSSL_SERVER_NAME }}server_name {{ $.NOSSL_SERVER_NAME }}; {{ end }} - access_log {{ $.NGINX_LOG_ROOT }}/{{ $.APP }}-access.log; - error_log {{ $.NGINX_LOG_ROOT }}/{{ $.APP }}-error.log; - - ssl_certificate {{ $.APP_SSL_PATH }}/server.crt; - ssl_certificate_key {{ $.APP_SSL_PATH }}/server.key; - ssl_protocols TLSv1.2 {{ if eq $.TLS13_SUPPORTED "true" }}TLSv1.3{{ end }}; - ssl_prefer_server_ciphers off; - - location / { - grpc_pass grpc://{{ $.APP }}-{{ $upstream_port }}; - } - include {{ $.DOKKU_ROOT }}/{{ $.APP }}/nginx.conf.d/*.conf; -} -{{ end }}{{ end }} -{{ end }} -{{ end }} {{ if $.DOKKU_APP_LISTENERS }} {{ range $upstream_port := $.PROXY_UPSTREAM_PORTS | split " " }} @@ -158,4 +121,4 @@ upstream {{ $.APP }}-{{ $upstream_port }} { {{ $listener_ip := index $listener_list 0 }} server {{ $listener_ip }}:{{ $upstream_port }};{{ end }} } -{{ end }}{{ end }} +{{ end }}