fix nginx upstream
This commit is contained in:
parent
599c306985
commit
aaa42cc7c8
@ -1,6 +1,6 @@
|
|||||||
#jinja2: lstrip_blocks: True
|
#jinja2: lstrip_blocks: True
|
||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
upstream backend {
|
upstream backend_unifi {
|
||||||
server {{ unifi_server_ip }}:{{ unifi_server_port }};
|
server {{ unifi_server_ip }}:{{ unifi_server_port }};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ server {
|
|||||||
return 301 https://$server_name$request_uri;
|
return 301 https://$server_name$request_uri;
|
||||||
{% else %}
|
{% else %}
|
||||||
location / {
|
location / {
|
||||||
proxy_pass https://backend;
|
proxy_pass https://backend_unifi;
|
||||||
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "Upgrade";
|
proxy_set_header Connection "Upgrade";
|
||||||
@ -30,7 +30,7 @@ server {
|
|||||||
server_name {{ unifi_server_name }};
|
server_name {{ unifi_server_name }};
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass https://backend;
|
proxy_pass https://backend_unifi;
|
||||||
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "Upgrade";
|
proxy_set_header Connection "Upgrade";
|
||||||
|
Loading…
Reference in New Issue
Block a user