[GH-ISSUE #3178] Possible problem with two nginx containers and the Advanced option of virtual hosts? #2154

Closed
opened 2026-02-26 07:34:15 +03:00 by kerem · 2 comments
Owner

Originally created by @taimadoCE on GitHub (Sep 3, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3178

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • No. I'm in 2.10.4 but in 2.9.22 get the same problem
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

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

Originally created by @taimadoCE on GitHub (Sep 3, 2023). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3178 **Checklist** - Have you pulled and found the error with `jc21/nginx-proxy-manager:latest` docker image? - No. I'm in 2.10.4 but in 2.9.22 get the same problem - Are you sure you're not using someone else's docker image? - Yes - Have you searched for similar issues (both open and closed)? - Yes **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](https://github.com/NginxProxyManager/nginx-proxy-manager/assets/57089805/2692c635-1a39-4bdc-9889-62f846714f6b) With only 1 server with the advanced option filled ![imagen](https://github.com/NginxProxyManager/nginx-proxy-manager/assets/57089805/823e8c32-df39-485e-a870-635aa134a3e7) With both servers with the advanced options filled Am I doing something wrong? **Nginx Proxy Manager Version** <!-- What version of Nginx Proxy Manager is reported on the login page? --> 2.10.4
kerem 2026-02-26 07:34:15 +03:00
  • closed this issue
  • added the
    stale
    bug
    labels
Author
Owner

@github-actions[bot] commented on GitHub (Apr 6, 2024):

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

<!-- gh-comment-id:2040852115 --> @github-actions[bot] commented on GitHub (Apr 6, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@github-actions[bot] commented on GitHub (Jun 3, 2025):

Issue was closed due to inactivity.

<!-- gh-comment-id:2933129021 --> @github-actions[bot] commented on GitHub (Jun 3, 2025): Issue was closed due to inactivity.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#2154
No description provided.