diff --git a/README.md b/README.md index 16fbfe8..e8f6f14 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,12 @@ auth: *authconfig* # array of headers to add on this vhost add_headers: [] + +# SSL key, mutally exclusive with letsencrypt option +key: ~ + +# SSL certificat, mutally exclusive with letsencrypt option +crt: ~ ``` **locationconfig**: diff --git a/templates/vhost.conf.j2 b/templates/vhost.conf.j2 index 1e14ef9..fe80cb8 100644 --- a/templates/vhost.conf.j2 +++ b/templates/vhost.conf.j2 @@ -80,5 +80,8 @@ server { {% if vhost.letsencrypt|d(False) %} ssl_certificate /etc/ssl/nginx_{{ vhost_name }}.chain.crt; 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 %} }