support the case for smartgears_special_redirect
This commit is contained in:
parent
6dd638ffee
commit
73fdaee1d9
|
@ -165,13 +165,19 @@ server {
|
||||||
proxy_pass http://127.0.0.1:{{ smartgears_http_port }}/$uri;
|
proxy_pass http://127.0.0.1:{{ smartgears_http_port }}/$uri;
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if smartgears_special_redirect is defined %}
|
||||||
|
{% for target in smartgears_special_redirect %}
|
||||||
|
location {{ target.source_uri }} {
|
||||||
|
return 301 http://{{ target.dest_host }}/{{ target.dest_url }};
|
||||||
|
}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
location / {
|
location / {
|
||||||
return 301 https://{{ item.servername }}$request_uri;
|
return 301 https://{{ item.servername }}$request_uri;
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{% if letsencrypt_acme_install %}
|
{% if letsencrypt_acme_install %}
|
||||||
|
@ -343,6 +349,12 @@ server {
|
||||||
proxy_pass http://127.0.0.1:{{ smartgears_http_port }}/$uri;
|
proxy_pass http://127.0.0.1:{{ smartgears_http_port }}/$uri;
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if smartgears_special_redirect is defined %}
|
||||||
|
{% for target in smartgears_special_redirect %}
|
||||||
|
location {{ target.source_uri }} {
|
||||||
|
return 301 http://{{ target.dest_host }}/{{ target.dest_url }};
|
||||||
|
}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue