nginx/site: Fix upstream hostname
This commit is contained in:
parent
08fbb13640
commit
4a09185aeb
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
{% if proxy is defined and proxy is not string %}
|
{% if proxy is defined and proxy is not string %}
|
||||||
upstream upstream-{{ site }} {
|
upstream {{ site }} {
|
||||||
{% for item in proxy %}
|
{% for item in proxy %}
|
||||||
{% set item = item | regex_replace("^(https://)?([^/]*).*$", "\\2") %}
|
{% set item = item | regex_replace("^(https://)?([^/]*).*$", "\\2") %}
|
||||||
{% if item | regex_search(".*:[0-9]+$") %}
|
{% if item | regex_search(".*:[0-9]+$") %}
|
||||||
|
@ -39,7 +39,7 @@ server {
|
||||||
{% set path = proxy[0] | regex_replace("^(https://)?([^/]*)(.*)$", "\\3") %}
|
{% set path = proxy[0] | regex_replace("^(https://)?([^/]*)(.*)$", "\\3") %}
|
||||||
# https://trac.nginx.org/nginx/ticket/1307
|
# https://trac.nginx.org/nginx/ticket/1307
|
||||||
proxy_ssl_verify off;
|
proxy_ssl_verify off;
|
||||||
proxy_pass https://upstream-{{ site }}{{ path }};
|
proxy_pass https://{{ site }}{{ path }};
|
||||||
{% else %}
|
{% else %}
|
||||||
proxy_pass {{ proxy }};
|
proxy_pass {{ proxy }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue