From 4387d1cb911eefbcd5e92ba20b3cb23a9812bafd Mon Sep 17 00:00:00 2001 From: John Stucklen Date: Fri, 15 Feb 2019 16:24:37 -0500 Subject: [PATCH] Fix existing redirect test. --- nginx.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx.tmpl b/nginx.tmpl index 114c899..e09d340 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -200,7 +200,7 @@ server { listen [::]:{{ $listen_port }} {{ $default_server }}; {{ end }} access_log /var/log/nginx/access.log vhost; - return 301 https://$host:{{ $listen_port_ssl -}}$request_uri; + return 301 https://$host{{ if not (eq $listen_port_ssl "443") }}:{{ $listen_port_ssl }}{{ end }}$request_uri; } {{ end }}