added support for custom tls certificates

This commit is contained in:
nd 2020-05-22 21:57:17 +02:00
parent 7183dcfe66
commit 5d65c9c976
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
2 changed files with 9 additions and 0 deletions

View file

@ -90,6 +90,12 @@ auth: *authconfig*
# array of headers to add on this vhost # array of headers to add on this vhost
add_headers: [] add_headers: []
# SSL key, mutally exclusive with letsencrypt option
key: ~
# SSL certificat, mutally exclusive with letsencrypt option
crt: ~
``` ```
**locationconfig**: **locationconfig**:

View file

@ -80,5 +80,8 @@ server {
{% if vhost.letsencrypt|d(False) %} {% if vhost.letsencrypt|d(False) %}
ssl_certificate /etc/ssl/nginx_{{ vhost_name }}.chain.crt; ssl_certificate /etc/ssl/nginx_{{ vhost_name }}.chain.crt;
ssl_certificate_key /etc/ssl/private/nginx_{{ vhost_name }}.key; ssl_certificate_key /etc/ssl/private/nginx_{{ vhost_name }}.key;
{% elif vhost.crt|d(None) and vhost.key|d(None) %}
ssl_certificate {{ vhost.crt }};
ssl_certificate_key {{ vhost.key }};
{% endif %} {% endif %}
} }