This commit is contained in:
Mikaël Capelle
2020-11-29 11:33:31 +00:00
parent dc5621cb53
commit 1a4b870530
5 changed files with 35 additions and 23 deletions

View File

@@ -75,7 +75,7 @@ server {
server_name _; # This is just an invalid value which will never trigger on a real hostname.
listen 80;
access_log /var/log/nginx/access.log vhost;
location /.well-known/ {
location /.well-known/acme-challenge {
root /var/www/certbot;
}
@@ -94,7 +94,7 @@ server {
# ssl_certificate /etc/nginx/certs/default.crt;
# ssl_certificate_key /etc/nginx/certs/default.key;
location /.well-known/ {
location /.well-known/acme-challenge {
root /var/www/certbot;
}
@@ -157,6 +157,8 @@ upstream {{ $upstream_name }} {
{{ $is_https := (and (ne $https_method "nohttps") (ne $vhostCertDir "") (exists (printf "/etc/letsencrypt/live/%s/fullchain.pem" $host)) (exists (printf "/etc/letsencrypt/live/%s/privkey.pem" $host))) }}
{{ $is_https := true }}
{{ if $is_https }}
{{ if eq $https_method "redirect" }}
@@ -181,8 +183,11 @@ server {
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
ssl_certificate /etc/letsencrypt/live/{{ (printf "%s" $host) }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ (printf "%s" $host) }}/privkey.pem;
{{/* ssl_certificate /etc/letsencrypt/live/{{ (printf "%s" $host) }}/fullchain.pem; */}}
{{/* ssl_certificate_key /etc/letsencrypt/live/{{ (printf "%s" $host) }}/privkey.pem; */}}
ssl_certificate /etc/letsencrypt/live/typename.fr/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/typename.fr/privkey.pem;
{{ if (exists (printf "/etc/letsencrypt/live/%s.dhparam.pem" $host)) }}
ssl_dhparam {{ printf "/etc/letsencrypt/live/%s.dhparam.pem" $host }};
@@ -198,7 +203,7 @@ server {
include /etc/nginx/vhost.d/default;
{{ end }}
location /.well-known/ {
location /.well-known/acme-challenge {
root /var/www/certbot;
}
@@ -236,7 +241,7 @@ server {
include /etc/nginx/vhost.d/default;
{{ end }}
location /.well-known/ {
location /.well-known/acme-challenge {
root /var/www/certbot;
}