diff --git a/nginx.tmpl b/nginx.tmpl index b4140f9..31e6ce1 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -54,6 +54,17 @@ server { return 503; } +{{ if (and (exists "/etc/nginx/certs/default.crt") (exists "/etc/nginx/certs/default.key")) }} +server { + server_name _; # This is just an invalid value which will never trigger on a real hostname. + listen 443 ssl spdy; + return 503; + + ssl_certificate /etc/nginx/certs/default.crt; + ssl_certificate_key /etc/nginx/certs/default.key; +} +{{ end }} + {{ range $host, $containers := groupByMulti $ "Env.VIRTUAL_HOST" "," }} upstream {{ $host }} {