From a882e8ab2b712afef06f9385f8cb4e234509b94a Mon Sep 17 00:00:00 2001 From: mrflos Date: Tue, 29 Nov 2022 11:35:10 +0300 Subject: [PATCH] fix(template) : better nginx letsencrypt --- templates/nginx-maindomain.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/templates/nginx-maindomain.php b/templates/nginx-maindomain.php index 55a91d3..47691bd 100644 --- a/templates/nginx-maindomain.php +++ b/templates/nginx-maindomain.php @@ -6,8 +6,15 @@ server { listen [::]:80; listen 80; server_name www.e($domain)?> e($domain)?>; + + location ^~ /.well-known/acme-challenge/ { + root /home/e($user)?>/e($domain)?>; + try_files $uri =404; + } - return 301 https://e($domain)?>$request_uri; + location / { + return 301 https://e($domain)?>$request_uri; + } }