NginxProxyManager / nginx-proxy-manager

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

proxy_ssl_server_name directive not being honored by config #2821

Open drtech981 opened 1 year ago

drtech981 commented 1 year ago

I am using authelia for single sign on for my endpoints, and the request needs to be proxied to the server hosting authelia together with the SNI for HTTPS, hence I had added proxy_ssl_server_name to the Advanced tab.

As of the latest version, proxied hosts are not working and I am getting a 500 error. Logs show

2023/04/12 09:22:08 [error] 388#388: *504 connect() failed (110: Connection timed out) while connecting to upstream, client: 10.2.0.1, server: files.sgpgi.myhome.cc, request: "GET / HTTP/2.0", subrequest: "/authelia", upstream: "http://152.70.47.111:80/api/verify/", host: "files.sgpgi.myhome.cc"
2023/04/12 09:22:08 [error] 388#388: *504 auth request unexpected status: 502 while sending to client, client: 10.2.0.1, server: files.sgpgi.myhome.cc, request: "GET / HTTP/2.0", host: "files.sgpgi.myhome.cc"

NGINX is not using the hostname, instead uses the explicit IP to forward the request, which fails since the server hosting authelia also has other websites hosted using NGINX reverse proxy.

github-actions[bot] commented 5 months ago

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