|
@@ -5,14 +5,12 @@ server { |
|
|
listen 443 ssl; |
|
|
listen 443 ssl; |
|
|
listen [::]:443 ssl; |
|
|
listen [::]:443 ssl; |
|
|
|
|
|
|
|
|
ssl_certificate /etc/ssl/certs/{{ vhost.name }}.fullchain.pem; |
|
|
|
|
|
ssl_certificate_key /etc/ssl/private/{{ vhost.name }}.key.pem; |
|
|
|
|
|
|
|
|
ssl_certificate /etc/ssl/certs/{{ certificate_name | default(vhost.certificate_name) | default(vhost.name) }}.fullchain.pem; |
|
|
|
|
|
ssl_certificate_key /etc/ssl/private/{{ certificate_name | default(vhost.certificate_name) | default(vhost.name) }}.key.pem; |
|
|
|
|
|
|
|
|
charset utf-8; |
|
|
|
|
|
|
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; "; |
|
|
|
|
|
|
|
|
{% if vhost.root is defined %} |
|
|
|
|
|
root {{ vhost.root }}; |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
charset utf-8; |
|
|
|
|
|
|
|
|
{% if vhost.try_files is defined %} |
|
|
{% if vhost.try_files is defined %} |
|
|
try_files {{ vhost.try_files }}; |
|
|
try_files {{ vhost.try_files }}; |
|
@@ -39,6 +37,10 @@ server { |
|
|
{% endfor %} |
|
|
{% endfor %} |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
|
|
{% if vhost.root is defined %} |
|
|
|
|
|
root {{ vhost.root }}; |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
server { |
|
|
server { |
|
@@ -48,6 +50,11 @@ server { |
|
|
|
|
|
|
|
|
server_name {{ vhost.server_names | join(' ') }}; |
|
|
server_name {{ vhost.server_names | join(' ') }}; |
|
|
|
|
|
|
|
|
|
|
|
location /.well-known/acme-challenge { |
|
|
|
|
|
default_type "text/plain"; |
|
|
|
|
|
root /var/www/default; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return 301 https://$host$request_uri; |
|
|
return 301 https://$host$request_uri; |
|
|
|
|
|
|
|
|
} |
|
|
} |