adjust template
This commit is contained in:
parent
50878bb950
commit
fbd5bb72ef
@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# {{ansible_managed}}
|
# {{ansible_managed}}
|
||||||
{% for proxysite in proxy %}
|
{% for proxysite in proxy %}
|
||||||
certbot renew --nginx --cert-name {{proxysite.domain}}
|
certbot renew --nginx --cert-name {{ proxysite.domain }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for staticsite in static %}
|
{% for staticsite in static %}
|
||||||
certbot renew --nginx --cert-name {{staticsite.domain}}
|
certbot renew --nginx --cert-name {{ staticsite.domain }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -62,11 +62,11 @@ http {
|
|||||||
server {
|
server {
|
||||||
listen 443 ssl http2;
|
listen 443 ssl http2;
|
||||||
listen [::]:443 ssl http2 ipv6only=on;
|
listen [::]:443 ssl http2 ipv6only=on;
|
||||||
server_name {{proxysite.domain}};
|
server_name {{ proxysite.domain }};
|
||||||
ssl_certificate /etc/letsencrypt/live/{{proxysite.domain}}/fullchain.pem;
|
ssl_certificate /etc/letsencrypt/live/{{ proxysite.domain }}/fullchain.pem;
|
||||||
ssl_certificate_key /etc/letsencrypt/live/{{proxysite.domain}}/privkey.pem;
|
ssl_certificate_key /etc/letsencrypt/live/{{ proxysite.domain }}/privkey.pem;
|
||||||
location /{
|
location /{
|
||||||
proxy_pass https://{{proxysite.ip}};
|
proxy_pass https://{{ proxysite.ip }};
|
||||||
proxy_ssl_verify off;
|
proxy_ssl_verify off;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -77,10 +77,10 @@ http {
|
|||||||
server {
|
server {
|
||||||
listen 443 ssl http2;
|
listen 443 ssl http2;
|
||||||
listen [::]:443 ssl http2 ipv6only=on;
|
listen [::]:443 ssl http2 ipv6only=on;
|
||||||
server_name {{staticsite.domain}};
|
server_name {{ staticsite.domain }};
|
||||||
ssl_certificate /etc/letsencrypt/live/{{proxysite.domain}}/fullchain.pem;
|
ssl_certificate /etc/letsencrypt/live/{{ proxysite.domain }}/fullchain.pem;
|
||||||
ssl_certificate_key /etc/letsencrypt/live/{{proxysite.domain}}/privkey.pem;
|
ssl_certificate_key /etc/letsencrypt/live/{{ proxysite.domain }}/privkey.pem;
|
||||||
root {{staticsite.directory}};
|
root {{ staticsite.directory }};
|
||||||
location /{
|
location /{
|
||||||
try_files $uri $uri/ =404;
|
try_files $uri $uri/ =404;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user