various bug fixes related to HTTPS
This commit is contained in:
@@ -1,6 +1,22 @@
|
||||
listen 0.0.0.0:{{ HTTPS_PORT }} ssl {% if HTTP2 == "yes" %}http2{% endif %};
|
||||
ssl_certificate {{ HTTPS_CERT }};
|
||||
ssl_certificate_key {{ HTTPS_KEY }};
|
||||
{% set paths = {"cert": "", "key": ""} %}
|
||||
{% if AUTO_LETS_ENCRYPT == "yes" %}
|
||||
{% set x = paths.update({"cert": "/etc/letsencrypt/live/" + FIRST_SERVER + "/fullchain.pem"}) %}
|
||||
{% set x = paths.update({"key": "/etc/letsencrypt/live/" + FIRST_SERVER + "/privkey.pem"}) %}
|
||||
{% elif USE_CUSTOM_HTTPS == "yes" %}
|
||||
{% set x = paths.update({"cert": CUSTOM_HTTPS_CERT}) %}
|
||||
{% set x = paths.update({"key": CUSTOM_HTTPS_KEY}) %}
|
||||
{% elif GENERATE_SELF_SIGNED_HTTPS == "yes" %}
|
||||
{% if MULTISITE == "yes" %}
|
||||
{% set x = paths.update({"cert": "/etc/nginx/" + FIRST_SERVER + "/self-cert.pem"}) %}
|
||||
{% set x = paths.update({"key": "/etc/nginx/" + FIRST_SERVER + "/self-key.pem"}) %}
|
||||
{% else %}
|
||||
{% set x = paths.update({"cert": "/etc/nginx/self-cert.pem"}) %}
|
||||
{% set x = paths.update({"key": "/etc/nginx/self-key.pem"}) %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
ssl_certificate {{ paths["cert"] }};
|
||||
ssl_certificate_key {{ paths["key"] }};
|
||||
ssl_protocols {{ HTTPS_PROTOCOLS }};
|
||||
ssl_prefer_server_ciphers on;
|
||||
ssl_session_tickets off;
|
||||
|
||||
Reference in New Issue
Block a user