fix(template) : better nginx letsencrypt
This commit is contained in:
parent
906ba1a461
commit
a882e8ab2b
1 changed files with 8 additions and 1 deletions
|
@ -6,8 +6,15 @@ server {
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name <?php if (!$subDomain) : ?>www.<?=$this->e($domain)?> <?php endif ?><?=$this->e($domain)?>;
|
server_name <?php if (!$subDomain) : ?>www.<?=$this->e($domain)?> <?php endif ?><?=$this->e($domain)?>;
|
||||||
|
|
||||||
|
location ^~ /.well-known/acme-challenge/ {
|
||||||
|
root /home/<?=$this->e($user)?>/<?=$this->e($domain)?>;
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
|
|
||||||
return 301 https://<?=$this->e($domain)?>$request_uri;
|
location / {
|
||||||
|
return 301 https://<?=$this->e($domain)?>$request_uri;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
<?php if (!$subDomain) : ?>
|
<?php if (!$subDomain) : ?>
|
||||||
|
|
Loading…
Reference in a new issue