nginx/server: Extracted special pre directives into configurable vars

dehydrated
Felix Stupp 4 years ago
parent 11814fe236
commit 647f112c2b
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -2,3 +2,14 @@
# domain: example.com
# directives: "server { … }"
listen_directives: |
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name_directives: |
server_name {{ domain }};
certificates_directives: |
ssl_certificate {{ acme_certificate_location }};
ssl_certificate_key {{ acme_key_location }};

@ -1,10 +1,8 @@
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name {{ domain }};
{{ listen_directives | indent(width=2) }}
{{ server_name_directives | indent(width=2) }}
ssl_certificate {{ acme_certificate_location }};
ssl_certificate_key {{ acme_key_location }};
{{ certificates_directives | indent(width=2) }}
include {{ nginx_snippets_directory }}/https;
include {{ nginx_snippets_directory }}/global;

Loading…
Cancel
Save