Add check if catch-all ("_") is used as server_name and if so replace _ with .
This commit is contained in:
parent
e8295ef303
commit
956f37ac06
@ -83,7 +83,7 @@ server {
|
||||
root {{ item.value.root }};
|
||||
{% endif %}
|
||||
{% if item.value.https_redirect is defined and item.value.https_redirect %}
|
||||
return 301 https://{{ item.value.server_name }}$request_uri;
|
||||
return 301 https://{% if item.value.server_name == "_" %}$host{% else %}{{ item.value.server_name }}{% endif %}$request_uri;
|
||||
{% endif %}
|
||||
{% if item.value.autoindex is defined and item.value.autoindex %}
|
||||
autoindex on;
|
||||
|
Loading…
Reference in New Issue
Block a user