mirror of
https://github.com/HanXHX/ansible-nginx.git
synced 2026-04-11 12:52:10 +07:00
vhost redirect_from accepts string
This commit is contained in:
@@ -153,7 +153,7 @@ server {
|
|||||||
{% for port in __listen %}
|
{% for port in __listen %}
|
||||||
listen {{ port }};
|
listen {{ port }};
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
server_name {{ item.redirect_from | join(' ') }};
|
server_name {% if item.redirect_from is string %}{{ item.redirect_from }}{% else %}{{ item.redirect_from | join(' ') }}{% endif %};
|
||||||
return 301 $scheme://{{ __main_name }}$request_uri;
|
return 301 $scheme://{{ __main_name }}$request_uri;
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user