From cf83d16606d96d461435d5cb5641fb1bf45e9c74 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 18 Jun 2016 13:53:07 -0300 Subject: Initial certbot support --- templates/site.erb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'templates') 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 %> <% 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/ + /.well-known/acme-challenge/"> + Options None + AllowOverride None + ForceType text/plain + RedirectMatch 404 "^(?!/\.well-known/acme-challenge/[\w-]{43}$)" + +<% end -%> # end vhost for <%= @title %> <% if @ssl == true %> -- cgit v1.2.3