mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-07-01 14:25:46 +00:00
Ensure cert exists before referencing it
This commit is contained in:
@ -79,7 +79,7 @@ upstream {{ $host }} {
|
|||||||
{{/* Use the cert specifid on the container or fallback to the best vhost match */}}
|
{{/* Use the cert specifid on the container or fallback to the best vhost match */}}
|
||||||
{{ $cert := (coalesce $certName $vhostCert) }}
|
{{ $cert := (coalesce $certName $vhostCert) }}
|
||||||
|
|
||||||
{{ if (ne $cert "") }}
|
{{ if (and (ne $cert "") (exists (printf "/etc/nginx/certs/%s.crt" $cert)) (exists (printf "/etc/nginx/certs/%s.key" $cert))) }}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
server_name {{ $host }};
|
server_name {{ $host }};
|
||||||
|
Reference in New Issue
Block a user