mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-28 10:55:54 +03:00
[GH-ISSUE #911] Basic Authentication for Access rules is not working #771
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#771
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 @NovaViper on GitHub (Feb 21, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/911
Describe the bug
Hey guys, I'm noticing that basic authentication isn't working on my instance at all. None of my reverse proxies are displaying the authentication dialog on any of my machines (tried on both my laptop and desktop, as well as my phone).
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A authentication menu from the browser should be appearing
Screenshots
If applicable, add screenshots to help explain your problem.
Operating System
Raspberry pi 4 running Raspian Lite with OpenMediaVault installed, Nginx Proxy Manager is installed a docker container within Portainer.
Additional context
Add any other context about the problem here, docker version, browser version if applicable to the problem. Too much info is better than too little. Nginx Proxy Manager version is v2.8.0
@andreas-barthel commented on GitHub (Feb 23, 2021):
Have you tried to enable "Satisfy Any" in the Access List?
@NovaViper commented on GitHub (Feb 24, 2021):
Yeah, it's still not working
@bpivk commented on GitHub (Feb 25, 2021):
I have the same problem.
Details: Satisfy any enabled
Authorization: Username/password set
Access: Left default so ony deny all is filled at the bottom.
Changing all the settings hasn't changed anything.
@jtrosper commented on GitHub (Mar 2, 2021):
Encountering the same exact issue here as described above.
@LouisAugry commented on GitHub (Mar 12, 2021):
I have the same problem when I have custom location, without custom location it works.
@tmrtkn commented on GitHub (Mar 17, 2021):
I also have this problem. With custom location authentication doesn't work, without it, it works.
@tmrtkn commented on GitHub (Mar 17, 2021):
I'm not so sure about other cases, but my case seems to be that I am using / custom location path.
In https://github.com/jc21/nginx-proxy-manager/blob/master/backend/internal/nginx.js#L219 is a line "host.use_default_location = false;".
And then, in https://github.com/jc21/nginx-proxy-manager/blob/master/backend/templates/proxy_host.conf#L21, only the default location puts the authorization magic into the configuration file. If "use_default_location" is false, the authorization magic is omitted.
I am not a javascript expert by any means. Does this make any sense?
@tmrtkn commented on GitHub (Mar 17, 2021):
Sorry about the spam. I probably found a workaround for my case. I added the following into custom location's custom configuration
At least for me, that made the authentication dialog to appear. I hope that the configuration, as a whole, is still sane.
edit: I'm running npm in docker. version 2.8.0.
I have only 1 access list, hence
1inauth_basic_user_file's value.edit2: Force ssl by adding this into the configuration
@MrColumbo commented on GitHub (Apr 14, 2022):
I have the same issue. I am not quite sure how the custom location workaround is supposed to work. Do I need to put in a path? If I need to put in a path .....does it need to exist and what kind of files are expected at that path?

I added a screenshot of my npm custom dialog:
@berengard commented on GitHub (Sep 11, 2022):
I have a suspicion that it doesn't like symbols in the password.
After making a new access list for the 4th time, I gave it a password with only alphanumeric characters, then I assigned the access list to the host and it worked.
Before that it was showing me the authentication dialog sometimes but never accepting the password.
And at one point it was working in firefox, but not in chrome, which is totally weird! :/
@randomparity commented on GitHub (Jan 3, 2024):
Having the same problem. If I generate a password from the command-line with
htpasswdand insert the result into the access file with a text editor then I'm able to use a password with special characters:@speakradmin commented on GitHub (Jan 16, 2024):
Ran into this same problem running 2.10.4. Hope the dev can check it out
@speakradmin commented on GitHub (Jan 16, 2024):
Ok scratch that. I was doing this on an older verion.
Fresh install of 2.10.4 getting forbidden with no prompt on any host with a basic auth access list but the fix from @randomparity doesn't work. IP based still works fine.
Tested in incognito as well to make sure there wasn't some browser cache interfering
@github-actions[bot] commented on GitHub (Aug 24, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@jelen07 commented on GitHub (Sep 25, 2024):
Same issue with nginx
nginx:1.27.1@az1611 commented on GitHub (Nov 1, 2024):
I am facing the same issue with npm v2.12.1 with no custom location, no special characters in the user/password as well as no difference if I tick/untick the satisfy any checkbox.
Whenever the access list is applied to the proxy host, i face the forbidden screen immediately.
I've also tried to apply the changes and restart the container with no avail.
Thank you
@digitaltim-de commented on GitHub (Dec 13, 2024):
Same error i got 403 forbidden but that not asking for a password or something.
@AntiiHeld commented on GitHub (Dec 13, 2024):
I have the same problem.
v2.12.1, no custom location, password like "test" (for testing), no difference betweet satisfy any on or off.
// Edit
I also noticed that when I want to edit an entry in the Access List, I get the error message "data/items/0/password must NOT have fewer than 1 characters".
@Japhys commented on GitHub (Dec 20, 2024):
Same problem after a clean install. Used to work but I was probably on an older version
@Ivanthec commented on GitHub (Dec 25, 2024):
I'm a complete noob at this stuff so not sure if this is a long-term fix or if NPM will overwrite this.
I took @tmrtkn fix and applied it directly to the file.
Again...I am a noob but to me it looks like it isn't saving some of the changes from the gui.
I had mine set to /data/compose
From what I can tell, only certain things are writing over from the GUI
I had to change "satisfy all" to "satisfy any"
and the text below with the rest of the proxy header settings
proxy_set_header Authorization "";
Rebooted NPM
Profit! Received the login prompt
@yamikeigo commented on GitHub (Jan 24, 2025):
noob or not, merry belated Christmas to you good sir. Your hamfisting actually worked!
@yamikeigo commented on GitHub (Jan 24, 2025):
btw is this app basically dead? seems like very many stale issues. had to blow up my instance a while back due to certs not renewing and that issue was stale too.
@Ivanthec commented on GitHub (Jan 31, 2025):
Minimal updates for sure. I switched to Zoraxy and it is amazing. No Basic Auth work arounds :)
@github-actions[bot] commented on GitHub (Aug 21, 2025):
Issue is now considered stale. If you want to keep it open, please comment 👍