fix(template) : better nginx letsencrypt
This commit is contained in:
parent
906ba1a461
commit
a882e8ab2b
1 changed files with 8 additions and 1 deletions
|
@ -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) : ?>
|
||||
|
|
Loading…
Reference in a new issue