NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
22.05k stars 2.54k forks source link

Possible problem with two nginx containers and the Advanced option of virtual hosts? #3178

Open taimadoCE opened 1 year ago

taimadoCE commented 1 year ago

Checklist

Describe the bug

I currently have several virtual hosts running on my NPM server which runs under docker. One of them points to an nginx container where I host a website under the domain ejemplo1.com. The other in turn to another nginx container that hosts another wb under the domain ejemplo2.com In the virtual host 1 I have in the Advanced option the following, which allows me to get the real IP of the clients:

location / {

include conf.d/include/proxy.conf;

set_real_ip_from 192.168.1.0/24; set_real_ip_from 172.17.0.0/16; set_real_ip_from 103.21.244.0/22; set_real_ip_from 103.22.200.0/22; set_real_ip_from 103.31.4.0/22; set_real_ip_from 104.16.0.0/13; set_real_ip_from 104.24.0.0/14; set_real_ip_from 108.162.192.0/18; set_real_ip_from 131.0.72.0/22; set_real_ip_from 141.101.64.0/18; set_real_ip_from 162.158.0.0/15; set_real_ip_from 172.64.0.0/13; set_real_ip_from 173.245.48.0/20; set_real_ip_from 188.114.96.0/20; set_real_ip_from 190.93.240.0/20; set_real_ip_from 197.234.240.0/22; set_real_ip_from 198.41.128.0/17; set_real_ip_from 2400:cb00::/32; set_real_ip_from 2606:4700::/32; set_real_ip_from 2803:f800::/32; set_real_ip_from 2405:b500::/32; set_real_ip_from 2405:8100::/32; set_real_ip_from 2a06:98c0::/29; set_real_ip_from 2c0f:f248::/32;

real_ip_header CF-Connecting-IP; }

This is how it works and I get real public addresses from server 1 clients. The problem comes when trying to put this same thing on server 2. If I type the same above on server 2 the status of server 2 changes to offline. It is not a problem of the server itself. If I put what was written in the advanced of server 1 in server 2 (and leave empty advanced in server 1) this works fine. The problem is if I put those options on both servers. One of them works but the other puts it in offline mode.

imagen With only 1 server with the advanced option filled

imagen With both servers with the advanced options filled

Am I doing something wrong?

Nginx Proxy Manager Version

2.10.4

github-actions[bot] commented 5 months ago

Issue is now considered stale. If you want to keep it open, please comment :+1: