NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
23.19k stars 2.69k forks source link

Nginx sub-domain authentication #1163

Open patrickmilnes opened 3 years ago

patrickmilnes commented 3 years ago

Checklist

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

LiamKarlMitchell commented 3 years ago

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

patrickmilnes commented 3 years ago

@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.

github-actions[bot] commented 8 months ago

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