[GH-ISSUE #743] The access list doesn't work if you use custom locations. #629

Closed
opened 2026-02-26 06:33:44 +03:00 by kerem · 9 comments
Owner

Originally created by @fischdenflo on GitHub (Nov 28, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/743

Unfortunately the access list doesn't work if you use it like that.

Originally posted by @fischdenflo in https://github.com/jc21/nginx-proxy-manager/issues/104#issuecomment-735018126

Originally created by @fischdenflo on GitHub (Nov 28, 2020). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/743 Unfortunately the access list doesn't work if you use it like that. _Originally posted by @fischdenflo in https://github.com/jc21/nginx-proxy-manager/issues/104#issuecomment-735018126_
kerem closed this issue 2026-02-26 06:33:44 +03:00
Author
Owner

@mochman commented on GitHub (Dec 3, 2020):

For a workaround, you can just add your access criteria to the custom location settings. It has to be updated though, if you change the access list criteria.

<!-- gh-comment-id:738250904 --> @mochman commented on GitHub (Dec 3, 2020): For a workaround, you can just add your access criteria to the custom location settings. It has to be updated though, if you change the access list criteria.
Author
Owner

@fischdenflo commented on GitHub (Dec 3, 2020):

Is it possible to give me an example? 🙈 But many thanks 🙏

<!-- gh-comment-id:738255964 --> @fischdenflo commented on GitHub (Dec 3, 2020): Is it possible to give me an example? 🙈 But many thanks 🙏
Author
Owner

@mochman commented on GitHub (Dec 4, 2020):

Sure. This example only allows local IPs from 192.168.0.0 - 192.168.255.255 to have access.

    # Access Rules
    allow 192.168.0.0/16;
    deny all;

    # Access checks must...
    satisfy all;

The way I got this was to make a fake proxy host with an access list I wanted to use. Then I went into my ./data/nginx/proxy_host/ folder on my server. There you will see a bunch of numbered .conf files. Open the highest numbered one (the one just created). In the

location / {

section of that file, you should see a set of access rules that were made. Just copy those into your actual custom locations.

<!-- gh-comment-id:738570672 --> @mochman commented on GitHub (Dec 4, 2020): Sure. This example only allows local IPs from 192.168.0.0 - 192.168.255.255 to have access. ``` # Access Rules allow 192.168.0.0/16; deny all; # Access checks must... satisfy all; ``` The way I got this was to make a fake proxy host with an access list I wanted to use. Then I went into my `./data/nginx/proxy_host/` folder on my server. There you will see a bunch of numbered .conf files. Open the highest numbered one (the one just created). In the ``` location / { ``` section of that file, you should see a set of access rules that were made. Just copy those into your actual custom locations.
Author
Owner

@fischdenflo commented on GitHub (Dec 4, 2020):

Ok I will test ist. Many Thanks 🙏

<!-- gh-comment-id:738720123 --> @fischdenflo commented on GitHub (Dec 4, 2020): Ok I will test ist. Many Thanks 🙏
Author
Owner

@derekoharrow commented on GitHub (Dec 14, 2020):

I'm seeing the same behaviour - access lists seem to be ineffective if you have custom locations specified. This is quite a critical feature to be missing.

How can you setup user basic authentication with custom locations?

<!-- gh-comment-id:744572036 --> @derekoharrow commented on GitHub (Dec 14, 2020): I'm seeing the same behaviour - access lists seem to be ineffective if you have custom locations specified. This is quite a critical feature to be missing. How can you setup user basic authentication with custom locations?
Author
Owner

@mjeschar commented on GitHub (Jan 19, 2021):

Same issue here, 90% of my domains are using custom locations. I really need the working basic auth. for those services. Any chance to implement it? I really like the GUI!

<!-- gh-comment-id:763148973 --> @mjeschar commented on GitHub (Jan 19, 2021): Same issue here, 90% of my domains are using custom locations. I really need the working basic auth. for those services. Any chance to implement it? I really like the GUI!
Author
Owner

@l4rm4nd commented on GitHub (Mar 26, 2021):

Custom locations will break any access lists. Further, the HTTP/2 SSL option can also break access lists.

If you need to have custom locations, proceed as explained by @mochman. Configure your access rules specifically for each custom location entry.

For basic auth:

# Authorization, specify the correct access list id, example id is 1
auth_basic        "Authorization required";
auth_basic_user_file        /data/access/1;

For IP restrictions:

# Access Rules
satisfy all;
allow 192.168.0.0/16;
allow 10.0.0.0/8;
allow 172.16.0.0/12;
deny all;

You can combine both. Remember, if you set the satisfy directive to all, access is granted if a client satisfies both conditions (auth + IP). If you set the directive to any, access is granted if a client satisfies at least one condition.

<!-- gh-comment-id:808417628 --> @l4rm4nd commented on GitHub (Mar 26, 2021): Custom locations will break any access lists. Further, the HTTP/2 SSL option can also break access lists. If you need to have custom locations, proceed as explained by @mochman. Configure your access rules specifically for each custom location entry. For basic auth: ```` # Authorization, specify the correct access list id, example id is 1 auth_basic "Authorization required"; auth_basic_user_file /data/access/1; ```` For IP restrictions: ```` # Access Rules satisfy all; allow 192.168.0.0/16; allow 10.0.0.0/8; allow 172.16.0.0/12; deny all; ```` You can combine both. Remember, if you set the satisfy directive to ``all``, access is granted if a client satisfies both conditions (auth + IP). If you set the directive to ``any``, access is granted if a client satisfies at least one condition.
Author
Owner

@mcastorina commented on GitHub (Apr 3, 2021):

I think this is a pretty critical bug. The UI implies the access list is effective for the entire proxy host when it's not for custom locations.

<!-- gh-comment-id:812771793 --> @mcastorina commented on GitHub (Apr 3, 2021): I think this is a pretty critical bug. The UI implies the access list is effective for the entire proxy host when it's not for custom locations.
Author
Owner

@chaptergy commented on GitHub (May 12, 2021):

Duplicate of https://github.com/jc21/nginx-proxy-manager/issues/148

<!-- gh-comment-id:840102584 --> @chaptergy commented on GitHub (May 12, 2021): Duplicate of https://github.com/jc21/nginx-proxy-manager/issues/148
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#629
No description provided.