From f0d6612c5fae0a4fc04a0d4705798728d22fab9e Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 1 Feb 2026 11:34:13 +0100 Subject: Try to make alex.corcoles.net work --- infrastructure/roles/web/tasks/main.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/infrastructure/roles/web/tasks/main.yaml b/infrastructure/roles/web/tasks/main.yaml index 193bd44..023367b 100644 --- a/infrastructure/roles/web/tasks/main.yaml +++ b/infrastructure/roles/web/tasks/main.yaml @@ -65,6 +65,34 @@ RewriteRule "^/~alex/(.*)" "/~alex/${alexblog:$1}" [R=308,L] notify: restart web +- name: alex.corcoles.net + ansible.builtin.copy: + dest: /etc/apache2/sites-enabled/alex-corcoles-net.conf + content: | + {% if web_server_reachable %} + MDomain alex.corcoles.net + MDCertificateAgreement accepted + {% endif %} + + + ServerName alex.corcoles.net + SSLEngine on + + {% if not web_server_reachable %} + SSLCertificateFile "/etc/ssl/certs/ssl-cert-snakeoil.pem" + SSLCertificateKeyFile "/etc/ssl/private/ssl-cert-snakeoil.key" + + {% endif %} + ServerAdmin {{ admin_email }} + + DocumentRoot /home/alex/public_html/ + + RewriteEngine on + RewriteCond ${alexblog:$1} >"" + RewriteMap alexblog "txt:/home/alex/public_html/redirections.txt" + RewriteRule "^(.*)" "${alexblog:$1}" [R=308,L] + + notify: restart web - name: gemini ansible.builtin.copy: dest: /etc/apache2/conf-enabled/gemini.conf -- cgit v1.2.3