[GH-ISSUE #2793] Unable to login using self-proxied domain #1920

Open
opened 2026-02-26 07:33:15 +03:00 by kerem · 14 comments
Owner

Originally created by @BigJazzz on GitHub (Apr 2, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2793

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes (#1992 - it's the same error, but appears to be different circumstances?)

Describe the bug
As in the above ticket, I'm unable to log in using a proxied, access-restricted domain. The page refreshes after logging in with no error on page. This bug doesn't occur when using the local IP address, or when setting NPM proxy host to Public.

Nginx Proxy Manager Version
2.10.2

To Reproduce
Steps to reproduce the behavior:

  1. Create host entry pointing to self
  2. Create access list with:
  • Satisfy Any
  • Username/password
  • IP whitelist
  1. Try logging in
  2. Screen refreshes with no error
  3. Check logs, see below error

Expected behavior
NPM should log in when self-proxying. This was working previously, however a recent update seems to have stopped this. Unfortunately I can't tell you which version this works on.

Screenshots
N/A

Operating System
Raspbian GNU/Linux 11 (bullseye)

Additional context

  • I haven't tried to downgrade yet
  • I was previously running NPM on an Ubuntu VM, which worked until the above bug occurred. I then did a fresh install on RPi with no data transfer, and am experiencing the same issue again.
  • Portainer log output:
-------------------------------------
User ID:  0
Group ID: 0
-------------------------------------
s6-rc: info: service prepare successfully started
s6-rc: info: service nginx: starting
s6-rc: info: service frontend: starting
s6-rc: info: service backend: starting
s6-rc: info: service backend successfully started
❯ Starting backend ...
s6-rc: info: service nginx successfully started
s6-rc: info: service frontend successfully started
s6-rc: info: service legacy-services: starting
❯ Starting nginx ...
s6-rc: info: service legacy-services successfully started
[4/2/2023] [1:34:08 AM] [Global   ] › ℹ  info      Using Sqlite: /data/database.sqlite
[4/2/2023] [1:34:11 AM] [Migrate  ] › ℹ  info      Current database version: none
[4/2/2023] [1:34:11 AM] [Setup    ] › ℹ  info      Logrotate Timer initialized
[4/2/2023] [1:34:11 AM] [Setup    ] › ℹ  info      Logrotate completed.
[4/2/2023] [1:34:11 AM] [IP Ranges] › ℹ  info      Fetching IP Ranges from online services...
[4/2/2023] [1:34:11 AM] [IP Ranges] › ℹ  info      Fetching https://ip-ranges.amazonaws.com/ip-ranges.json
[4/2/2023] [1:34:11 AM] [IP Ranges] › ℹ  info      Fetching https://www.cloudflare.com/ips-v4
[4/2/2023] [1:34:11 AM] [IP Ranges] › ℹ  info      Fetching https://www.cloudflare.com/ips-v6
[4/2/2023] [1:34:11 AM] [SSL      ] › ℹ  info      Let's Encrypt Renewal Timer initialized
[4/2/2023] [1:34:11 AM] [SSL      ] › ℹ  info      Renewing SSL certs close to expiry...
[4/2/2023] [1:34:11 AM] [IP Ranges] › ℹ  info      IP Ranges Renewal Timer initialized
[4/2/2023] [1:34:11 AM] [Global   ] › ℹ  info      Backend PID 138 listening on port 3000 ...
[4/2/2023] [1:34:14 AM] [Nginx    ] › ℹ  info      Reloading Nginx
[4/2/2023] [1:34:14 AM] [SSL      ] › ℹ  info      Renew Complete
[4/2/2023] [1:35:13 AM] [Express  ] › ⚠  warning   Existing token contained invalid user data
[4/2/2023] [1:36:13 AM] [Nginx    ] › ℹ  info      Reloading Nginx
[4/2/2023] [1:36:13 AM] [Access   ] › ℹ  info      Building Access file #1 for: Internal Access
[4/2/2023] [1:36:13 AM] [Access   ] › ℹ  info      Adding: jarryd
[4/2/2023] [1:36:13 AM] [Global   ] › ⬤  debug     CMD: /usr/bin/htpasswd -b /data/access/1 jarryd [password]
[4/2/2023] [1:36:13 AM] [Access   ] › ✔  success   Built Access file #1 for: Internal Access
[4/2/2023] [1:36:25 AM] [Express  ] › ⚠  warning   Existing token contained invalid user data
Originally created by @BigJazzz on GitHub (Apr 2, 2023). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2793 **Checklist** - Have you pulled and found the error with `jc21/nginx-proxy-manager:latest` docker image? - Yes - Are you sure you're not using someone else's docker image? - Yes - Have you searched for similar issues (both open and closed)? - Yes (#1992 - it's the same error, but appears to be different circumstances?) **Describe the bug** As in the above ticket, I'm unable to log in using a proxied, access-restricted domain. The page refreshes after logging in with no error on page. This bug doesn't occur when using the local IP address, or when setting NPM proxy host to Public. **Nginx Proxy Manager Version** 2.10.2 **To Reproduce** Steps to reproduce the behavior: 1. Create host entry pointing to self 2. Create access list with: - Satisfy Any - Username/password - IP whitelist 3. Try logging in 4. Screen refreshes with no error 5. Check logs, see below error **Expected behavior** NPM should log in when self-proxying. This was working previously, however a recent update seems to have stopped this. Unfortunately I can't tell you which version this works on. **Screenshots** N/A **Operating System** Raspbian GNU/Linux 11 (bullseye) **Additional context** - I haven't tried to downgrade yet - I was previously running NPM on an Ubuntu VM, which worked until the above bug occurred. I then did a fresh install on RPi with no data transfer, and am experiencing the same issue again. - Portainer log output: ``` ------------------------------------- User ID: 0 Group ID: 0 ------------------------------------- s6-rc: info: service prepare successfully started s6-rc: info: service nginx: starting s6-rc: info: service frontend: starting s6-rc: info: service backend: starting s6-rc: info: service backend successfully started ❯ Starting backend ... s6-rc: info: service nginx successfully started s6-rc: info: service frontend successfully started s6-rc: info: service legacy-services: starting ❯ Starting nginx ... s6-rc: info: service legacy-services successfully started [4/2/2023] [1:34:08 AM] [Global ] › ℹ info Using Sqlite: /data/database.sqlite [4/2/2023] [1:34:11 AM] [Migrate ] › ℹ info Current database version: none [4/2/2023] [1:34:11 AM] [Setup ] › ℹ info Logrotate Timer initialized [4/2/2023] [1:34:11 AM] [Setup ] › ℹ info Logrotate completed. [4/2/2023] [1:34:11 AM] [IP Ranges] › ℹ info Fetching IP Ranges from online services... [4/2/2023] [1:34:11 AM] [IP Ranges] › ℹ info Fetching https://ip-ranges.amazonaws.com/ip-ranges.json [4/2/2023] [1:34:11 AM] [IP Ranges] › ℹ info Fetching https://www.cloudflare.com/ips-v4 [4/2/2023] [1:34:11 AM] [IP Ranges] › ℹ info Fetching https://www.cloudflare.com/ips-v6 [4/2/2023] [1:34:11 AM] [SSL ] › ℹ info Let's Encrypt Renewal Timer initialized [4/2/2023] [1:34:11 AM] [SSL ] › ℹ info Renewing SSL certs close to expiry... [4/2/2023] [1:34:11 AM] [IP Ranges] › ℹ info IP Ranges Renewal Timer initialized [4/2/2023] [1:34:11 AM] [Global ] › ℹ info Backend PID 138 listening on port 3000 ... [4/2/2023] [1:34:14 AM] [Nginx ] › ℹ info Reloading Nginx [4/2/2023] [1:34:14 AM] [SSL ] › ℹ info Renew Complete [4/2/2023] [1:35:13 AM] [Express ] › ⚠ warning Existing token contained invalid user data [4/2/2023] [1:36:13 AM] [Nginx ] › ℹ info Reloading Nginx [4/2/2023] [1:36:13 AM] [Access ] › ℹ info Building Access file #1 for: Internal Access [4/2/2023] [1:36:13 AM] [Access ] › ℹ info Adding: jarryd [4/2/2023] [1:36:13 AM] [Global ] › ⬤ debug CMD: /usr/bin/htpasswd -b /data/access/1 jarryd [password] [4/2/2023] [1:36:13 AM] [Access ] › ✔ success Built Access file #1 for: Internal Access [4/2/2023] [1:36:25 AM] [Express ] › ⚠ warning Existing token contained invalid user data ```
Author
Owner

@rahul1996pp commented on GitHub (Aug 13, 2023):

you can fix this issue by adding this in .conf that you can found in this path "/data/nginx/proxy_host"

proxy_set_header Authorization $http_authorization;

<!-- gh-comment-id:1676462864 --> @rahul1996pp commented on GitHub (Aug 13, 2023): you can fix this issue by adding this in .conf that you can found in this path "/data/nginx/proxy_host" proxy_set_header Authorization $http_authorization;
Author
Owner

@AlgoYu commented on GitHub (Aug 14, 2023):

https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2793#issuecomment-1676462864
same, not work.

<!-- gh-comment-id:1676524693 --> @AlgoYu commented on GitHub (Aug 14, 2023): https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2793#issuecomment-1676462864 same, not work.
Author
Owner

@cepheiden commented on GitHub (Oct 27, 2023):

same here

<!-- gh-comment-id:1782561580 --> @cepheiden commented on GitHub (Oct 27, 2023): same here
Author
Owner

@aheath70 commented on GitHub (Dec 11, 2023):

Just hit the same issue.

<!-- gh-comment-id:1849934214 --> @aheath70 commented on GitHub (Dec 11, 2023): Just hit the same issue.
Author
Owner

@KvizadSaderah commented on GitHub (Jan 5, 2024):

proxy_set_header Authorization $http_authorization;

helped, thanks!

<!-- gh-comment-id:1878454224 --> @KvizadSaderah commented on GitHub (Jan 5, 2024): > proxy_set_header Authorization $http_authorization; helped, thanks!
Author
Owner

@luiscamalmeida commented on GitHub (Feb 23, 2024):

I belive it has something to do with access lists and this option

image

<!-- gh-comment-id:1960648437 --> @luiscamalmeida commented on GitHub (Feb 23, 2024): I belive it has something to do with access lists and this option ![image](https://github.com/NginxProxyManager/nginx-proxy-manager/assets/22885224/890cc13e-b183-4cb3-8a18-efb5b6b41880)
Author
Owner

@matteo-passeri commented on GitHub (Apr 2, 2024):

Same here, and this:

you can fix this issue by adding this in .conf that you can found in this path "/data/nginx/proxy_host"

proxy_set_header Authorization $http_authorization;

didn't work unfortunately.

<!-- gh-comment-id:2032635589 --> @matteo-passeri commented on GitHub (Apr 2, 2024): Same here, and this: > you can fix this issue by adding this in .conf that you can found in this path "/data/nginx/proxy_host" > > proxy_set_header Authorization $http_authorization; didn't work unfortunately.
Author
Owner

@theasianpianist commented on GitHub (May 9, 2024):

I ran into this same issue, was able to resolve it by clearing my browser (Chrome) cache via the dev console https://developer.chrome.com/docs/devtools/network/reference/?utm_source=devtools#disable-cache

<!-- gh-comment-id:2101881998 --> @theasianpianist commented on GitHub (May 9, 2024): I ran into this same issue, was able to resolve it by clearing my browser (Chrome) cache via the dev console https://developer.chrome.com/docs/devtools/network/reference/?utm_source=devtools#disable-cache
Author
Owner

@coreyaboy commented on GitHub (Jun 1, 2024):

Woa boy this is a frustrating nugget to chew on. I've been over every suggestion I can find on this one, and none of them will do the trick for me. Throwing my name in the "doesn't work for me" bucket. Don't think I have anything meaningful to contribute though ...

<!-- gh-comment-id:2143633935 --> @coreyaboy commented on GitHub (Jun 1, 2024): Woa boy this is a frustrating nugget to chew on. I've been over every suggestion I can find on this one, and none of them will do the trick for me. Throwing my name in the "doesn't work for me" bucket. Don't think I have anything meaningful to contribute though ...
Author
Owner

@Ctrl-Alt-Delight commented on GitHub (Jun 2, 2024):

I ran into this same issue which lead me to this thread.

I recently added a IP range to an access list, but it turns out my password manager decided to autofill an authorization username/password at the same time. Removing the Authorization username/password fixed the issue for my setup.

<!-- gh-comment-id:2144040667 --> @Ctrl-Alt-Delight commented on GitHub (Jun 2, 2024): I ran into this same issue which lead me to this thread. I recently added a IP range to an access list, but it turns out my password manager decided to autofill an authorization username/password at the same time. Removing the Authorization username/password fixed the issue for my setup.
Author
Owner

@github-actions[bot] commented on GitHub (Jan 14, 2025):

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

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

@krzysieki commented on GitHub (Jan 18, 2025):

The issue is still there in version 2.12.2.

During the login process:

  • the HTTP POST api call to /api/tokens ends with success
  • next there is a HTTP GET api call to /api/tokens which ends with error 400 Bad request
<!-- gh-comment-id:2600281604 --> @krzysieki commented on GitHub (Jan 18, 2025): The issue is still there in version 2.12.2. During the login process: - the HTTP POST api call to /api/tokens ends with success - next there is a HTTP GET api call to /api/tokens which ends with error 400 Bad request
Author
Owner

@5hanth commented on GitHub (Mar 18, 2025):

this is also leaves tf provider unuseable.

github.com/NginxProxyManager/nginx-proxy-manager@79d28f03d0/backend/internal/proxy-host.js (L29)

resource "nginxproxymanager_proxy_host" "cloud_http" {
  domain_names = ["cloud.${var.cloud_host}"]
  forward_scheme = "http"
  forward_host = "${var.nginx_proxy_manager_name}"
  forward_port = 81
  
  access_list_id = 0
  caching_enabled = false
  allow_websocket_upgrade = true
  block_exploits = true
  http2_support = true
  
  locations = []
  
  advanced_config = ""
  
  ssl_forced = false
  
  depends_on = [
    var.bootstrap_wait_complete
  ]
}

error:

│ Error: Client Error
│ 
│   with module.prepare.nginxproxymanager_proxy_host.cloud_http,
│   on modules/nginx_proxy_manager/prepare/main.tf line 10, in resource "nginxproxymanager_proxy_host" "cloud_http":
│   10: resource "nginxproxymanager_proxy_host" "cloud_http" {
│ 
│ Unable to create proxy host, got error: 502 Bad Gateway

<!-- gh-comment-id:2734188724 --> @5hanth commented on GitHub (Mar 18, 2025): this is also leaves [tf provider](https://registry.terraform.io/providers/Sander0542/nginxproxymanager/latest/docs) unuseable. https://github.com/NginxProxyManager/nginx-proxy-manager/blob/79d28f03d035114b80dcd04845306ecb98175074/backend/internal/proxy-host.js#L29 ```terraform resource "nginxproxymanager_proxy_host" "cloud_http" { domain_names = ["cloud.${var.cloud_host}"] forward_scheme = "http" forward_host = "${var.nginx_proxy_manager_name}" forward_port = 81 access_list_id = 0 caching_enabled = false allow_websocket_upgrade = true block_exploits = true http2_support = true locations = [] advanced_config = "" ssl_forced = false depends_on = [ var.bootstrap_wait_complete ] } ``` error: ```bash │ Error: Client Error │ │ with module.prepare.nginxproxymanager_proxy_host.cloud_http, │ on modules/nginx_proxy_manager/prepare/main.tf line 10, in resource "nginxproxymanager_proxy_host" "cloud_http": │ 10: resource "nginxproxymanager_proxy_host" "cloud_http" { │ │ Unable to create proxy host, got error: 502 Bad Gateway ```
Author
Owner

@github-actions[bot] commented on GitHub (Oct 10, 2025):

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

<!-- gh-comment-id:3388035357 --> @github-actions[bot] commented on GitHub (Oct 10, 2025): Issue is now considered stale. If you want to keep it open, please comment :+1:
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#1920
No description provided.