diff options
| author | alex <alex@pdp7.net> | 2026-02-01 11:34:13 +0100 |
|---|---|---|
| committer | alex <alex@pdp7.net> | 2026-02-01 11:34:13 +0100 |
| commit | f0d6612c5fae0a4fc04a0d4705798728d22fab9e (patch) | |
| tree | d47f36dedc007eb6d16a0f5dac23d8fb00254831 /infrastructure/roles/web/tasks | |
| parent | 9b596eb615ced4073499404b513148ae21b28d01 (diff) | |
Try to make alex.corcoles.net work
Diffstat (limited to 'infrastructure/roles/web/tasks')
| -rw-r--r-- | infrastructure/roles/web/tasks/main.yaml | 28 |
1 files changed, 28 insertions, 0 deletions
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] </VirtualHost> 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 %} + + <VirtualHost alex.corcoles.net:443> + 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] + </VirtualHost> + notify: restart web - name: gemini ansible.builtin.copy: dest: /etc/apache2/conf-enabled/gemini.conf |
