mirror of
https://github.com/xiaoxinpro/nginx-proxy-manager-zh.git
synced 2025-01-22 12:58:13 -05:00
Add set directives for proxies to keep from crashing if upstream is down
This commit is contained in:
parent
63d06da8a8
commit
554d1ff2b6
@ -6,7 +6,12 @@
|
|||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_pass {{ forward_scheme }}://{{ forward_host }}:{{ forward_port }}{{ forward_path }};
|
|
||||||
|
set $proxy_forward_scheme {{ forward_scheme }};
|
||||||
|
set $proxy_server "{{ forward_host }}";
|
||||||
|
set $proxy_port {{ forward_port }};
|
||||||
|
|
||||||
|
proxy_pass $proxy_forward_scheme://$proxy_server:$proxy_port{{ forward_path }};
|
||||||
|
|
||||||
{% include "_access.conf" %}
|
{% include "_access.conf" %}
|
||||||
{% include "_assets.conf" %}
|
{% include "_assets.conf" %}
|
||||||
|
Loading…
Reference in New Issue
Block a user