[GH-ISSUE #1163] Nginx sub-domain authentication #955

Closed
opened 2026-02-26 06:35:12 +03:00 by kerem · 4 comments
Owner

Originally created by @patrickmilnes on GitHub (Jun 8, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1163

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

Describe the bug

I have a web application and an authentication provider running in docker compose with nginx proxy manager. Im trying to add authentication, such that any atempt to access the web appplication is redirected via a sub-request to /auth endpoint of the authentication provider.

The custom config is being attached to the web app in advanced settings of the proxy host.

nginx custom conf:

auth_request    /auth;
auth_request_set $auth_status $upstream_status;

location = /auth {
  internal;
  proxy_pass              {endpoint/auth};
  proxy_pass_request_body off;
  proxy_set_header        Content-Length "";
}

Nginx Proxy Manager Version

v2.9.2

To Reproduce
Steps to reproduce the behavior:

  1. Add above config to proxy host.
  2. Navigate to proxy host.
  3. Error

Expected behavior

If not authenticated, redirect to authentication provider login page. If authenticated, display proxy host.

Screenshots

image

Operating System

Docker on Ubuntu 18.04

Additional context

Originally created by @patrickmilnes on GitHub (Jun 8, 2021). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1163 **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 **Describe the bug** <!-- A clear and concise description of what the bug is. --> I have a web application and an authentication provider running in docker compose with nginx proxy manager. Im trying to add authentication, such that any atempt to access the web appplication is redirected via a sub-request to /auth endpoint of the authentication provider. The custom config is being attached to the web app in advanced settings of the proxy host. nginx custom conf: ``` auth_request /auth; auth_request_set $auth_status $upstream_status; location = /auth { internal; proxy_pass {endpoint/auth}; proxy_pass_request_body off; proxy_set_header Content-Length ""; } ``` **Nginx Proxy Manager Version** <!-- What version of Nginx Proxy Manager is reported on the login page? --> v2.9.2 **To Reproduce** Steps to reproduce the behavior: 1. Add above config to proxy host. 2. Navigate to proxy host. 3. Error **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> If not authenticated, redirect to authentication provider login page. If authenticated, display proxy host. **Screenshots** <!-- If applicable, add screenshots to help explain your problem. --> ![image](https://user-images.githubusercontent.com/33280737/121213773-72a45300-c876-11eb-8aea-3f81eea5df62.png) **Operating System** <!-- Please specify if using a Rpi, Mac, orchestration tool or any other setups that might affect the reproduction of this error. --> Docker on Ubuntu 18.04 **Additional context** <!-- Add any other context about the problem here, docker version, browser version, logs if applicable to the problem. Too much info is better than too little. -->
kerem 2026-02-26 06:35:12 +03:00
  • closed this issue
  • added the
    stale
    bug
    labels
Author
Owner

@LiamKarlMitchell commented on GitHub (Jun 12, 2021):

Similar on a new setup made just today... seems like basic auth does not prompt the user at all? Even when not trying to do custom redirecting stuff?
Possibly related? https://github.com/jc21/nginx-proxy-manager/issues/637

<!-- gh-comment-id:860035917 --> @LiamKarlMitchell commented on GitHub (Jun 12, 2021): Similar on a new setup made just today... seems like basic auth does not prompt the user at all? Even when not trying to do custom redirecting stuff? Possibly related? https://github.com/jc21/nginx-proxy-manager/issues/637
Author
Owner

@patrickmilnes commented on GitHub (Jun 16, 2021):

@LiamKarlMitchell Yeah the prompt does not come up at all, just goes straight to the web page.

This should not have anything to do with access list.

<!-- gh-comment-id:862515848 --> @patrickmilnes commented on GitHub (Jun 16, 2021): @LiamKarlMitchell Yeah the prompt does not come up at all, just goes straight to the web page. This should not have anything to do with access list.
Author
Owner

@github-actions[bot] commented on GitHub (Mar 9, 2024):

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

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

@github-actions[bot] commented on GitHub (Apr 22, 2025):

Issue was closed due to inactivity.

<!-- gh-comment-id:2819877895 --> @github-actions[bot] commented on GitHub (Apr 22, 2025): Issue was closed due to inactivity.
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#955
No description provided.