bundles/nginx: ensure we're doing letsencrypt, since we're enforcing ssl

This commit is contained in:
Franzi 2020-06-01 11:16:22 +02:00
parent 54467af6f5
commit 3523edbcb4
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 9 additions and 0 deletions

View file

@ -19,6 +19,10 @@ server {
add_header Strict-Transport-Security "max-age=31104000; preload"; add_header Strict-Transport-Security "max-age=31104000; preload";
add_header X-Frame-Options "DENY"; add_header X-Frame-Options "DENY";
location /.well-known/acme-challenge/ {
alias /var/lib/dehydrated/acme-challenges/;
}
% if extras: % if extras:
<%include file="extras/${node.name}/${domain}" /> <%include file="extras/${node.name}/${domain}" />
% endif % endif

View file

@ -1,3 +1,8 @@
# TODO rework this to support specifying a certificate instead of
# relying on letsencrypt for the specific domain (for example to
# support wildcard certificates
assert node.has_bundle('letsencrypt'), 'nginx needs letsencrypt'
files = { files = {
'/etc/nginx/nginx.conf': { '/etc/nginx/nginx.conf': {
'content_type': 'mako', 'content_type': 'mako',