Open PlasmaSoftUK opened 2 years ago
So I've switched to another device, auth looks to be working as expected on a device that hasn't been used before. But on a device that is authenticated when it loads the custom locations, they load in the background but it still shows the Basic Auth Login box. At this point the page is loaded, I assume because the users is authenticated, so ....... either the page shouldn't load, or the login box shouldn't be displayed? There is definitely something not right here, unless I'm missing something in the custom locations config.
I can confirm that issue with v2.9.19. As soon as I add an location to the nginx config, it will stop working.
It looks like this will not be added, if there will be a defined location
in the backend. I checking the config in /data/nginx/proxy_host
after each changes to confirm that.
For those who have the same issue, here is a workaround:
access list
and get the ID of it from the first line Access List #2
proxy host
and edit your custom nginx configuration
add following code to your config and save your host:
# ...
# Authorization
auth_basic "Authorization required";
auth_basic_user_file /data/access/2; # this is the ID of your Access List
proxy_set_header Authorization "";
# Access Rules
deny all;
deny all;
# Access checks must...
satisfy any;
# ...
In my example I used Satisfy Any
without Pass Auth to Host
. If you have different settings you can find the generated config in your mounted /data
-volume:
proxy host
like you got it for the access list
in the backendcustom nginx configuration
of the host and save it/data/nginx/proxy_host
and find the file of {PROXY_HOST_ID_FROM_BACKEND}.conf
for example 32.conf
# Authorization
, # Access Rules
and # Access checks must...
parts in the .conf
-filecustom nginx configuration
to your proxy host
again and add the parts from the step beforeproxy host
and it should work Issue is now considered stale. If you want to keep it open, please comment :+1:
Checklist
jc21/nginx-proxy-manager:latest
docker image?Describe the bug I have built a Proxy Host which has a dns name, a valid SSL cert from LetsEncrypt using the latest Docker image.
I have added an Access list with Basic HTTP auth to this proxy, along with some custom locations:
/ ==> http://10.0.0.2:8181/ /radarr ==> http://10.0.0.2:7878/ /sonar ==> http://10.0.0.2:8989/ /nzbget ==> http://10.0.0.2:6789/
When accessing the default '/' location via https://my-dns-name.com/ I am presented with the basic auth login screen and it works as expected, if I authenticate and login I get to the page if I hit cancel, I get nothing.
When accessing any of the custom locations via https://my-dns-name.com/sonarr or https://my-dns-name.com/radarr the page loads in the background before the Auth is passed, and the login box is present over the top. if I hit cancel I can still browse the page just like I should be able to AFTER authentication.
Hitting Cancel on Basic Authentication dialog for custom locations (except '/') skips Auth and allows access to the page.
Nginx Proxy Manager Version v2.9.18
To Reproduce Steps to reproduce the behavior:
Expected behavior Page should NOT load in the background and when hitting Cancel on the Auth dialog the page should not be loaded. I would expect a blank page or a default auth failed page.
Screenshots
Operating System running under MacOS Monterey, and Docker version 20.10.12, build e91ed57