a very special endpoint

This commit is contained in:
Torma Kristóf 2022-05-22 23:07:20 +02:00
parent bb24e31bea
commit ef3cf7ba63
3 changed files with 24 additions and 7 deletions

View File

@ -1,5 +1,6 @@
#!/bin/bash
# {{ansible_managed}}
certbot renew --nginx --cert-name tormakristof.eu
{% for proxysite in proxy %}
certbot renew --nginx --cert-name {{ proxysite.domain }}
{% endfor %}

View File

@ -66,7 +66,7 @@ http {
return 301 https://$host$request_uri;
}
{% for proxysite in proxy %}
{%- for proxysite in proxy %}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
@ -80,9 +80,9 @@ http {
}
}
{% endfor %}
{%- endfor %}
{% for staticsite in static %}
{%- for staticsite in static %}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
@ -95,9 +95,9 @@ http {
}
}
{% endfor %}
{%- endfor %}
{% for redirectsite in redirect %}
{%- for redirectsite in redirect %}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
@ -107,5 +107,21 @@ http {
return 301 {{ redirectsite.destination }};
}
{% endfor %}
{%- endfor %}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name tormakristof.eu;
ssl_certificate /etc/letsencrypt/live/tormakristof.eu/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/tormakristof.eu/privkey.pem;
root /var/www/tormakristof.eu;
location /{
return 301 https://www.tormakristof.eu;
}
location /.well-known{
try_files $uri $uri/ =404;
}
}
}

View File

@ -15,7 +15,7 @@ proxy:
static:
- {domain: tormakristof.eu, directory: /var/www/tormakristof.eu, repo: "https://github.com/tormachris/localroot-tormakristof.eu.git"}
[]
redirect:
[]