mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-16 22:06:51 +00:00
PROXY Protocol support implementation
This commit is contained in:
@@ -1,15 +1,25 @@
|
||||
{% if enable_proxy_protocol == 1 or enable_proxy_protocol == true%}
|
||||
listen 88 proxy_protocol;
|
||||
{% if ipv6 -%}
|
||||
listen [::]:88 proxy_protocol;
|
||||
{% endif %}
|
||||
{% else -%}
|
||||
listen 80;
|
||||
{% if ipv6 -%}
|
||||
listen [::]:80;
|
||||
{% else -%}
|
||||
#listen [::]:80;
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if certificate -%}
|
||||
{% if enable_proxy_protocol == 1 or enable_proxy_protocol == true%}
|
||||
listen 444 ssl{% if http2_support %} http2{% endif %} proxy_protocol;
|
||||
{% if ipv6 -%}
|
||||
listen [::]:444 ssl{% if http2_support %} http2{% endif %} proxy_protocol;
|
||||
{% endif %}
|
||||
{% else -%}
|
||||
listen 443 ssl{% if http2_support %} http2{% endif %};
|
||||
{% if ipv6 -%}
|
||||
listen [::]:443 ssl{% if http2_support %} http2{% endif %};
|
||||
{% else -%}
|
||||
#listen [::]:443;
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
server_name {{ domain_names | join: " " }};
|
||||
{% endif %}
|
||||
server_name {{ domain_names | join: " " }};
|
6
backend/templates/_proxy_protocol.conf
Normal file
6
backend/templates/_proxy_protocol.conf
Normal file
@@ -0,0 +1,6 @@
|
||||
{% if enable_proxy_protocol == 1 or enable_proxy_protocol == true %}
|
||||
{% if load_balancer_ip != '' %}
|
||||
set_real_ip_from {{ load_balancer_ip }};
|
||||
real_ip_header proxy_protocol;
|
||||
{% endif %}
|
||||
{% endif %}
|
@@ -12,6 +12,7 @@ server {
|
||||
{% include "_exploits.conf" %}
|
||||
{% include "_hsts.conf" %}
|
||||
{% include "_forced_ssl.conf" %}
|
||||
{% include "_proxy_protocol.conf" %}
|
||||
|
||||
{% if allow_websocket_upgrade == 1 or allow_websocket_upgrade == true %}
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
|
Reference in New Issue
Block a user