2018-08-02 05:48:47 -04:00
|
|
|
# {{ domain_names | join: ", " }}
|
2018-08-01 07:18:17 -04:00
|
|
|
server {
|
|
|
|
listen 80;
|
2018-08-02 05:48:47 -04:00
|
|
|
{%- if ssl_enabled == 1 or ssl_enabled == true -%}
|
|
|
|
listen 443 ssl;
|
|
|
|
{%- endif %}
|
|
|
|
server_name {{ domain_names | join: " " }};
|
|
|
|
access_log /data/logs/proxy_host-{{ id }}.log proxy;
|
2018-08-01 07:18:17 -04:00
|
|
|
|
2018-08-02 05:48:47 -04:00
|
|
|
{%- if ssl_enabled == 1 or ssl_enabled == true -%}
|
|
|
|
{%- if ssl_provider == "letsencrypt" %}
|
|
|
|
# Let's Encrypt SSL
|
|
|
|
include conf.d/include/letsencrypt-acme-challenge.conf;
|
2018-08-01 07:18:17 -04:00
|
|
|
include conf.d/include/ssl-ciphers.conf;
|
2018-08-02 05:48:47 -04:00
|
|
|
ssl_certificate /etc/letsencrypt/live/proxy_host-{{ id }}/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/proxy_host-{{ id }}/privkey.pem;
|
|
|
|
{%- endif -%}
|
|
|
|
{%- endif %}
|
2018-08-01 07:18:17 -04:00
|
|
|
|
2018-08-02 05:48:47 -04:00
|
|
|
# TODO: Advanced config options
|
2018-08-01 07:18:17 -04:00
|
|
|
|
|
|
|
return 404;
|
|
|
|
}
|