nginx: Configure proxy key/cert globally and not in site
This commit is contained in:
parent
852770b74a
commit
3b67903e4f
2 changed files with 3 additions and 4 deletions
|
@ -25,6 +25,9 @@ http {
|
||||||
ssl_ciphers {{ tls_ciphers }};
|
ssl_ciphers {{ tls_ciphers }};
|
||||||
ssl_prefer_server_ciphers off;
|
ssl_prefer_server_ciphers off;
|
||||||
|
|
||||||
|
proxy_ssl_certificate {{ tls_certs }}/{{ inventory_hostname }}.crt;
|
||||||
|
proxy_ssl_certificate_key {{ tls_private }}/{{ inventory_hostname }}.key;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 443 ssl http2;
|
listen 443 ssl http2;
|
||||||
listen [::]:443 ssl http2;
|
listen [::]:443 ssl http2;
|
||||||
|
|
|
@ -22,8 +22,6 @@ server {
|
||||||
{% else %}
|
{% else %}
|
||||||
proxy_pass {{ proxy }};
|
proxy_pass {{ proxy }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
proxy_ssl_certificate {{ tls_certs }}/{{ inventory_hostname }}.crt;
|
|
||||||
proxy_ssl_certificate_key {{ tls_private }}/{{ inventory_hostname }}.key;
|
|
||||||
}
|
}
|
||||||
{% else %}
|
{% else %}
|
||||||
root /srv/web/{{ site }};
|
root /srv/web/{{ site }};
|
||||||
|
@ -38,8 +36,6 @@ server {
|
||||||
server_name {{ site }};
|
server_name {{ site }};
|
||||||
location /.well-known/acme-challenge/ {
|
location /.well-known/acme-challenge/ {
|
||||||
proxy_pass https://certbot.home.foo.sh/.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 / {
|
location / {
|
||||||
{% if redirect is defined %}
|
{% if redirect is defined %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue