Better display for server_name

pull/27/head
E Mantel 2016-11-16 20:51:03 +01:00 committed by GitHub
parent 19cdab5ba4
commit de71e1bdcc
1 changed files with 2 additions and 2 deletions

View File

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