adjust template

This commit is contained in:
Torma Kristóf 2022-04-14 22:18:21 +02:00
parent 50878bb950
commit fbd5bb72ef
2 changed files with 10 additions and 10 deletions

View File

@ -1,8 +1,8 @@
#!/bin/bash
# {{ansible_managed}}
{% for proxysite in proxy %}
certbot renew --nginx --cert-name {{proxysite.domain}}
certbot renew --nginx --cert-name {{ proxysite.domain }}
{% endfor %}
{% for staticsite in static %}
certbot renew --nginx --cert-name {{staticsite.domain}}
certbot renew --nginx --cert-name {{ staticsite.domain }}
{% endfor %}

View File

@ -62,11 +62,11 @@ http {
server {
listen 443 ssl http2;
listen [::]:443 ssl http2 ipv6only=on;
server_name {{proxysite.domain}};
ssl_certificate /etc/letsencrypt/live/{{proxysite.domain}}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{proxysite.domain}}/privkey.pem;
server_name {{ proxysite.domain }};
ssl_certificate /etc/letsencrypt/live/{{ proxysite.domain }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ proxysite.domain }}/privkey.pem;
location /{
proxy_pass https://{{proxysite.ip}};
proxy_pass https://{{ proxysite.ip }};
proxy_ssl_verify off;
}
}
@ -77,10 +77,10 @@ http {
server {
listen 443 ssl http2;
listen [::]:443 ssl http2 ipv6only=on;
server_name {{staticsite.domain}};
ssl_certificate /etc/letsencrypt/live/{{proxysite.domain}}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{proxysite.domain}}/privkey.pem;
root {{staticsite.directory}};
server_name {{ staticsite.domain }};
ssl_certificate /etc/letsencrypt/live/{{ proxysite.domain }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ proxysite.domain }}/privkey.pem;
root {{ staticsite.directory }};
location /{
try_files $uri $uri/ =404;
}