Update nginx.tmpl
This commit is contained in:
parent
025e3a11cf
commit
75a4f201f7
1 changed files with 4 additions and 4 deletions
|
@ -186,7 +186,7 @@ upstream {{ $upstream_name }} {
|
||||||
{{/* Use the cert specified on the container or fallback to the best vhost match */}}
|
{{/* Use the cert specified on the container or fallback to the best vhost match */}}
|
||||||
{{ $cert := (coalesce $certName $vhostCert) }}
|
{{ $cert := (coalesce $certName $vhostCert) }}
|
||||||
|
|
||||||
{{ $is_https := (and (ne $https_method "nohttps") (ne $cert "") (exists (printf "/etc/nginx/certs/%s.crt" $cert)) (exists (printf "/etc/nginx/certs/%s.key" $cert))) }}
|
{{ $is_https := (and (ne $https_method "nohttps") (ne $cert "") (exists (printf "/etc/nginx/certs/fullchain.pem" $cert)) (exists (printf "/etc/nginx/certs/privkey.pem" $cert))) }}
|
||||||
|
|
||||||
{{ if $is_https }}
|
{{ if $is_https }}
|
||||||
|
|
||||||
|
@ -249,8 +249,8 @@ server {
|
||||||
ssl_session_cache shared:SSL:50m;
|
ssl_session_cache shared:SSL:50m;
|
||||||
ssl_session_tickets off;
|
ssl_session_tickets off;
|
||||||
|
|
||||||
ssl_certificate /etc/nginx/certs/{{ (printf "%s.crt" $cert) }};
|
ssl_certificate /etc/nginx/certs/fullchain.pem;
|
||||||
ssl_certificate_key /etc/nginx/certs/{{ (printf "%s.key" $cert) }};
|
ssl_certificate_key /etc/nginx/certs/privkey.pem;
|
||||||
|
|
||||||
{{ if (exists (printf "/etc/nginx/certs/%s.dhparam.pem" $cert)) }}
|
{{ if (exists (printf "/etc/nginx/certs/%s.dhparam.pem" $cert)) }}
|
||||||
ssl_dhparam {{ printf "/etc/nginx/certs/%s.dhparam.pem" $cert }};
|
ssl_dhparam {{ printf "/etc/nginx/certs/%s.dhparam.pem" $cert }};
|
||||||
|
|
Loading…
Reference in a new issue