summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-06-18 13:53:07 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-06-18 13:53:07 -0300
commitcf83d16606d96d461435d5cb5641fb1bf45e9c74 (patch)
treec6c22c45f6771dc0c8613b12cc18836a0bdd2055 /templates
parentcf6b8e9eac809bca6e558131a56ba55accb3b46c (diff)
downloadpuppet-apache-cf83d16606d96d461435d5cb5641fb1bf45e9c74.tar.gz
puppet-apache-cf83d16606d96d461435d5cb5641fb1bf45e9c74.tar.bz2
Initial certbot support
Diffstat (limited to 'templates')
-rw-r--r--templates/site.erb12
1 files changed, 12 insertions, 0 deletions
diff --git a/templates/site.erb b/templates/site.erb
index 2ed5107..17ff13e 100644
--- a/templates/site.erb
+++ b/templates/site.erb
@@ -38,6 +38,18 @@
AllowOverride <%= @allow_override %>
</Directory>
<% end -%>
+<% if @certbot != false -%>
+ # Add Alias For Lets Encrypt WebRoot Authentication Using ACME
+ # See https://ubuntu101.co.za/ssl/postfix-and-dovecot-on-ubuntu-with-a-lets-encrypt-ssl-certificate/
+ AliasMatch ^/.well-known/acme-challenge/(.*)$ /var/spool/certbot/<%= @name %>/.well-known/acme-challenge/$1
+ Alias /.well-known/acme-challenge/ /var/spool/certbot/<%= @name %>/.well-known/acme-challenge/
+ <Directory "/var/spool/certbot/<%= @name %>/.well-known/acme-challenge/">
+ Options None
+ AllowOverride None
+ ForceType text/plain
+ RedirectMatch 404 "^(?!/\.well-known/acme-challenge/[\w-]{43}$)"
+ </Directory>
+<% end -%>
</VirtualHost>
# end vhost for <%= @title %>
<% if @ssl == true %>