From 45e89592d32ba3691b12da3765a1f8a0d557cedb Mon Sep 17 00:00:00 2001 From: neilpang Date: Mon, 5 Jun 2017 22:42:06 +0800 Subject: [PATCH] location is needed for acme.sh nginx mode --- nginx.tmpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nginx.tmpl b/nginx.tmpl index 8a8de27..83cb075 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -171,7 +171,9 @@ server { listen [::]:80 {{ $default_server }}; {{ end }} access_log /var/log/nginx/access.log vhost; - return 301 https://$host$request_uri; + location / { + return 301 https://$host$request_uri; + } } {{ end }}