mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[GH-ISSUE #334] Proxying NPM itself won't work when enabling ACL #292
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#292
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @eladent on GitHub (Mar 21, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/334
Checklist
jc21/nginx-proxy-manager:latestdocker image?Yes
Yes
Yes
Describe the bug
I use npm with portainer as a generic reverse proxy. It works perfectly, except... for NPM itself.
If i try to redirect "npm.mydomain.tld" to ":81" in order to get it accessible from network where only HTTP(S) port is reachable. I'll will land to the login page, but i get an unauthorized error when giving the credentials.
To Reproduce
In npm, create a new proxy host that redirect a domain to the npm internal IP:port.
Exemple : "npm.exemple.com" redirect to http://:81
Expected behavior
NPM should be able to redirect himself.
Screenshots

Operating System
Additional context
NPM running from a portainer, working fine with every over host on the server.
Thanks in advance!
@kymodoke commented on GitHub (Mar 21, 2020):
It does works. Tagging this question with the label "bug" is a bit too early... as it's probably just some misunderstanding about networks.
On my installation I do redirect port 81 of the NPM admin page to a HTTPS connexion on a domain.
Things is just don't do that redirdection/proxy to a real domaine name, but instead I use the container name itself as Forward Hostname
For instance on my installation, my NPM container name is "nginx-proxy-manager_app_1"
So I set up this Proxy Host as below with the container name:
And it does work. The proxy will recognize this endpoint and find from the docker network... and everything else works.
It's also the way I do proxy other containers to HTTPS domains.
Note: you can even remove the port 81 from the publically mapped port. The proxy will be able to access it anyway, so you'll have your admin accessible only from SSL.
@miguelwill commented on GitHub (Mar 21, 2020):
in my case I had the same problem when I wanted to use port 81 access and add an ACL with a previous username and password
after this the login shows error, I think NPM is reading the user from the http session instead of the login form
When I disabled the ACL on dashboard access, the access worked normally
@eladent commented on GitHub (Mar 22, 2020):
@miguelwill, thanks that's it ! You can't "auto-proxy" NPM with an access-list.
@kymodoke it solve the problem for me, but it's a bug. As far as i'm concerned : at least, it should be documented if not supported by NPM or fixed.
Anyway Thanks for your help !
@kymodoke commented on GitHub (Mar 22, 2020):
@eladent I do agree with you about the lack of documentation. There is a short doc about installation but quite nothing about usage.
I use NPM for less than a week, and I had to discovered several things about its usage by personal trial and errors...
@Raito00 commented on GitHub (Jun 3, 2021):
I have the same problem with Auth Loop only for NPM login ... V.2.9.3
@shaulliv commented on GitHub (Nov 23, 2021):
For me this also happens when I try to access list Portainer (exact same behavior).
@Danie10 commented on GitHub (Dec 22, 2021):
I've been going around in circles for hours until I found this bug report. If it is not meant to be that we use ACL with access to NPM itself, why not just document it (as someone else has suggested)? The same goes for the changing ACL settings and having to save the proxy hosts again for it to take. These are frustrations that would save many people hours, if they were just documented in FAQ or the documentation (at least until resolved at some later stage).