nginx: Configure proxy key/cert globally and not in site

This commit is contained in:
Timo Makinen 2020-09-09 19:55:00 +00:00
parent 852770b74a
commit 3b67903e4f
2 changed files with 3 additions and 4 deletions

View file

@ -25,6 +25,9 @@ http {
ssl_ciphers {{ tls_ciphers }};
ssl_prefer_server_ciphers off;
proxy_ssl_certificate {{ tls_certs }}/{{ inventory_hostname }}.crt;
proxy_ssl_certificate_key {{ tls_private }}/{{ inventory_hostname }}.key;
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;

View file

@ -22,8 +22,6 @@ server {
{% else %}
proxy_pass {{ proxy }};
{% endif %}
proxy_ssl_certificate {{ tls_certs }}/{{ inventory_hostname }}.crt;
proxy_ssl_certificate_key {{ tls_private }}/{{ inventory_hostname }}.key;
}
{% else %}
root /srv/web/{{ site }};
@ -38,8 +36,6 @@ server {
server_name {{ site }};
location /.well-known/acme-challenge/ {
proxy_pass https://certbot.home.foo.sh/.well-known/acme-challenge/;
proxy_ssl_certificate {{ tls_certs }}/{{ inventory_hostname }}.crt;
proxy_ssl_certificate_key {{ tls_private }}/{{ inventory_hostname }}.key;
}
location / {
{% if redirect is defined %}