소스 검색

'nginx-proxy/nginx.tmpl' ändern

Changed the https redirect to make LetsEncrypt work with ssl-Client Cert secured pages
hmetzner 7 년 전
부모
커밋
354900e8f0
1개의 변경된 파일11개의 추가작업 그리고 1개의 파일을 삭제
  1. 11 1
      nginx-proxy/nginx.tmpl

+ 11 - 1
nginx-proxy/nginx.tmpl

@@ -198,7 +198,17 @@ server {
 	listen [::]:80 {{ $default_server }};
 	{{ end }}
 	access_log /var/log/nginx/access.log vhost;
-	return 301 https://$host$request_uri;
+	location /.well-known/acme-challenge/ {
+	    auth_basic off;
+	    allow all;
+	    root /usr/share/nginx/html;
+	    try_files $uri =404;
+	    break;
+	}
+
+	location / {
+	    return 301 https://$host$request_uri;
+    }
 }
 {{ end }}