fix(template) : better nginx letsencrypt

This commit is contained in:
mrflos 2022-11-29 11:35:10 +03:00
parent 906ba1a461
commit a882e8ab2b

View file

@ -7,7 +7,14 @@ server {
listen 80;
server_name <?php if (!$subDomain) : ?>www.<?=$this->e($domain)?> <?php endif ?><?=$this->e($domain)?>;
return 301 https://<?=$this->e($domain)?>$request_uri;
location ^~ /.well-known/acme-challenge/ {
root /home/<?=$this->e($user)?>/<?=$this->e($domain)?>;
try_files $uri =404;
}
location / {
return 301 https://<?=$this->e($domain)?>$request_uri;
}
}
<?php if (!$subDomain) : ?>