Manage default vhost. Closes #11

This commit is contained in:
Emilien Mantel
2016-01-21 17:08:01 +01:00
parent c36c4824b7
commit 520eed50c3
5 changed files with 61 additions and 2 deletions

View File

@@ -25,12 +25,12 @@
server {
{% if 'http' in __proto %}
{% for port in __listen %}
listen {{ port }};
listen {{ port }}{% if nginx_default_vhost == __main_name %} default_server{% endif %};
{% endfor %}
{% endif %}
{% if 'https' in __proto %}
{% for port in __listen_ssl %}
listen {{ port }} ssl{% if nginx_auto_config_httpv2 and 'http_v2' in nginx_modules.stdout_lines %}http2{% endif %};
listen {{ port }}{% if nginx_default_vhost_ssl == __main_name %} default_server{% endif %} ssl{% if nginx_auto_config_httpv2 and 'http_v2' in nginx_modules.stdout_lines %}http2{% endif %};
{% endfor %}
{{ ssl(item.ssl_name) }}
include {{ nginx_helper_dir + '/ssl-' + item.ssl_template | default('strong') }};