NginxProxyManager / nginx-proxy-manager

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

Location directive ( location /{ ) causing proxy host to land at openresty landing page #3678

Open cirnoscodingclass opened 8 months ago

cirnoscodingclass commented 8 months ago

Checklist

Describe the bug When working under the Advanced tab of Edit Proxy Host I place the following addition to the config dialogue box

location / {
   proxy_set_header Host $http_host;
   proxy_set_header X-Forwarded-Host $http_host;
   proxy_set_header X-Forwarded-Port $server_port;
   proxy_set_header X-Forwarded-Proto $scheme;
   proxy_set_header X-Forwarded-For $remote_addr;
}

When this is added my sites redirects me to this screen

I have also tried to use =/ in front of the location directive but none of my changes appear to register. Also tried to add this configuration in the Custom locations tab but this shuts down the proxy host.

Adding the lines directly to the proxy_host .conf file causes the proxy_host to go offline.

Nginx Proxy Manager Version 2.11.1

Expected behavior For the headers to be applied to the location directive without redirecting traffic to the openresty page.

Screenshots Screenshot from 2024-04-03 21-03-36

Operating System Debian 12 Bookworm

Additional context I am trying run danbooru, the SSL certificate is DNS challenged by cloudflare

Docker Engine - Community
 Version:           26.0.0
 API version:       1.45
 Go version:        go1.21.8
 Git commit:        2ae903e
unixweb commented 8 months ago

Same issue here

Bildschirmfoto 2024-04-04 um 19 21 37 Bildschirmfoto 2024-04-04 um 19 17 12 Bildschirmfoto 2024-04-04 um 19 17 45

delsonffilho commented 7 months ago

@unixweb Did you tested in the version 2.11.1?

barrelltitor commented 7 months ago

@delsonffilho I can confirm this also happens on 2.11.1. I was pulling my hairs out trying to figure out what I broke

delsonffilho commented 7 months ago

I tested on 2.10.4 and it works.

thebodzio commented 7 months ago

I can confirm the problem with version > 2.10.x (running container from official image on Arch with rootless podman)

Hint: I noticed that whenever I tried to set up a custom location for a proxy host in 2.11.x, the config file associated with the edited host was removed from nginx/proxy_hosts. At the same time entry in database appears to be intact, since the host is still listed and remains editable with no data loss, but goes “Offline” as some previous commenters indicated.

unixweb commented 7 months ago

@unixweb Did you tested in the version 2.11.1?

Yes ...

s0mm3rb commented 7 months ago

can confirm 2.10.4 works

custom location in 2.11.1 seems to be broken

masterwishx commented 7 months ago

can confirm 2.10.4 works

custom location in 2.11.1 seems to be broken

Confirm, same issue with latest version goes back to 2.10.4

irrwitzer42 commented 7 months ago

At least for me, 2.11.2 seems to have fixed the issues with custom locations!

tosolini commented 7 months ago

2.11.2 not working, send me to openresty

Babyyoda777 commented 7 months ago

Broken for 2.11.1 and 2.11.2 whilst 2.11.1 was fully broken, 2.11.2 now just sends to blank page.

StuFrankish commented 6 months ago

Can confirm, also having this issue. Running on v2.11.2

wakawakaaa commented 2 weeks ago

same issue. nginx proxy manager is broken v2.12.1

Error "Could not delete file:" occurs only when setting ssl for a domain in the gui.