mirror of
https://github.com/xiaoxinpro/nginx-proxy-manager-zh.git
synced 2025-02-02 01:38:15 -05:00
Additional nginx config for real ip determination
This commit is contained in:
parent
3836f7c40a
commit
aa270925e9
@ -1,6 +1,3 @@
|
|||||||
# Generated IP Ranges for safe real IP determination
|
|
||||||
include conf.d/include/ip_ranges.conf;
|
|
||||||
|
|
||||||
# Healthcheck Host which proxies to the Manager,
|
# Healthcheck Host which proxies to the Manager,
|
||||||
# thus the healthcheck ensures both services are running
|
# thus the healthcheck ensures both services are running
|
||||||
server {
|
server {
|
||||||
|
@ -59,6 +59,15 @@ http {
|
|||||||
default http;
|
default http;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Real IP Determination
|
||||||
|
# Docker subnet:
|
||||||
|
set_real_ip_from 172.0.0.0/8;
|
||||||
|
# NPM generated CDN ip ranges:
|
||||||
|
include conf.d/include/ip_ranges.conf;
|
||||||
|
# always put the following 2 lines after ip subnets:
|
||||||
|
real_ip_header X-Forwarded-For;
|
||||||
|
real_ip_recursive on;
|
||||||
|
|
||||||
# Files generated by NPM
|
# Files generated by NPM
|
||||||
include /etc/nginx/conf.d/*.conf;
|
include /etc/nginx/conf.d/*.conf;
|
||||||
include /data/nginx/proxy_host/*.conf;
|
include /data/nginx/proxy_host/*.conf;
|
||||||
|
Loading…
Reference in New Issue
Block a user