nginx/site: Add support for port in failover backend
This commit is contained in:
parent
74f828edf2
commit
6193276604
1 changed files with 4 additions and 0 deletions
|
@ -1,7 +1,11 @@
|
||||||
{% if proxy is defined and proxy is not string %}
|
{% if proxy is defined and proxy is not string %}
|
||||||
upstream upstream_{{ site }} {
|
upstream upstream_{{ site }} {
|
||||||
{% for item in proxy %}
|
{% for item in proxy %}
|
||||||
|
{% if item | regex_search(".*:[0-9]+$") %}
|
||||||
|
server {{ item }};
|
||||||
|
{% else %}
|
||||||
server {{ item }}:443;
|
server {{ item }}:443;
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue