default vhost on HTTPS redirect

pull/27/head
Emilien Mantel 2016-11-15 17:15:39 +01:00
parent 999f226838
commit 19cdab5ba4
1 changed files with 1 additions and 1 deletions

View File

@ -138,7 +138,7 @@ server {
#
server {
{% for port in __listen %}
listen {{ port }};
listen {{ port }}{% if nginx_default_vhost == __main_name %} default_server{% endif %};
{% endfor %}
server_name {% if item.name is string %}{{ item.name }}{% else %}{{ item.name | join(' ') }}{% endif %};
return 301 https://{{ __main_name }}{% if '443' not in __listen_ssl %}:{{ __listen_ssl[0] }}{% endif %}$request_uri;