[GH-ISSUE #3678] Location directive ( location /{ ) causing proxy host to land at openresty landing page #2435

Open
opened 2026-02-26 07:35:33 +03:00 by kerem · 18 comments
Owner

Originally created by @cirnoscodingclass on GitHub (Apr 4, 2024).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3678

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
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
Originally created by @cirnoscodingclass on GitHub (Apr 4, 2024). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3678 **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** 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](https://github.com/NginxProxyManager/nginx-proxy-manager/assets/156504723/aad4948c-e5e5-4445-8e1e-0e4330beb0a6) **Operating System** Debian 12 Bookworm **Additional context** I am trying run [danbooru](https://github.com/danbooru/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 ```
Author
Owner

@unixweb commented on GitHub (Apr 4, 2024):

Same issue here

  • image: 'jc21/nginx-proxy-manager:2.10.4'. Works
  • image: 'jc21/nginx-proxy-manager:2.11.0' Don't works

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

<!-- gh-comment-id:2037778709 --> @unixweb commented on GitHub (Apr 4, 2024): Same issue here - image: 'jc21/nginx-proxy-manager:2.10.4'. Works - image: 'jc21/nginx-proxy-manager:2.11.0' Don't works ![Bildschirmfoto 2024-04-04 um 19 21 37](https://github.com/NginxProxyManager/nginx-proxy-manager/assets/12023025/fa4d0a90-e438-46e7-8cd1-d6466c5c26ef) ![Bildschirmfoto 2024-04-04 um 19 17 12](https://github.com/NginxProxyManager/nginx-proxy-manager/assets/12023025/77da9360-ae91-4174-b457-bf7ea0f3b2cc) ![Bildschirmfoto 2024-04-04 um 19 17 45](https://github.com/NginxProxyManager/nginx-proxy-manager/assets/12023025/435658b7-fb2a-4e49-ad2e-a8e5cf9509f8)
Author
Owner

@delsonffilho commented on GitHub (Apr 12, 2024):

@unixweb Did you tested in the version 2.11.1?

<!-- gh-comment-id:2051674835 --> @delsonffilho commented on GitHub (Apr 12, 2024): @unixweb Did you tested in the version 2.11.1?
Author
Owner

@barrelltitor commented on GitHub (Apr 15, 2024):

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

<!-- gh-comment-id:2057026492 --> @barrelltitor commented on GitHub (Apr 15, 2024): @delsonffilho I can confirm this also happens on 2.11.1. I was pulling my hairs out trying to figure out what I broke
Author
Owner

@delsonffilho commented on GitHub (Apr 15, 2024):

I tested on 2.10.4 and it works.

<!-- gh-comment-id:2057228252 --> @delsonffilho commented on GitHub (Apr 15, 2024): I tested on 2.10.4 and it works.
Author
Owner

@thebodzio commented on GitHub (Apr 17, 2024):

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.

<!-- gh-comment-id:2060101212 --> @thebodzio commented on GitHub (Apr 17, 2024): 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.
Author
Owner

@unixweb commented on GitHub (Apr 17, 2024):

@unixweb Did you tested in the version 2.11.1?

Yes ...

<!-- gh-comment-id:2060675964 --> @unixweb commented on GitHub (Apr 17, 2024): > @unixweb Did you tested in the version 2.11.1? Yes ...
Author
Owner

@s0mm3rb commented on GitHub (Apr 25, 2024):

can confirm 2.10.4 works

custom location in 2.11.1 seems to be broken

<!-- gh-comment-id:2077138183 --> @s0mm3rb commented on GitHub (Apr 25, 2024): can confirm 2.10.4 works custom location in 2.11.1 seems to be broken
Author
Owner

@masterwishx commented on GitHub (Apr 26, 2024):

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

<!-- gh-comment-id:2079995982 --> @masterwishx commented on GitHub (Apr 26, 2024): > 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
Author
Owner

@irrwitzer42 commented on GitHub (May 2, 2024):

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

<!-- gh-comment-id:2090463397 --> @irrwitzer42 commented on GitHub (May 2, 2024): At least for me, 2.11.2 seems to have fixed the issues with custom locations!
Author
Owner

@tosolini commented on GitHub (May 4, 2024):

2.11.2 not working, send me to openresty

<!-- gh-comment-id:2094063887 --> @tosolini commented on GitHub (May 4, 2024): 2.11.2 not working, send me to openresty
Author
Owner

@Babyyoda777 commented on GitHub (May 7, 2024):

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.

<!-- gh-comment-id:2098992433 --> @Babyyoda777 commented on GitHub (May 7, 2024): 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.
Author
Owner

@StuFrankish commented on GitHub (May 29, 2024):

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

<!-- gh-comment-id:2138108510 --> @StuFrankish commented on GitHub (May 29, 2024): Can confirm, also having this issue. Running on v2.11.2
Author
Owner

@wakawakaaa commented on GitHub (Nov 19, 2024):

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.

<!-- gh-comment-id:2486679942 --> @wakawakaaa commented on GitHub (Nov 19, 2024): 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.
Author
Owner

@github-actions[bot] commented on GitHub (May 23, 2025):

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

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

@barrelltitor commented on GitHub (May 23, 2025):

👍

<!-- gh-comment-id:2905239202 --> @barrelltitor commented on GitHub (May 23, 2025): 👍
Author
Owner

@barrelltitor commented on GitHub (May 23, 2025):

The stale bot is probably the silliest thing people do on github. No developer wants to tackle fixing it, so let's just close it huh?

<!-- gh-comment-id:2905240541 --> @barrelltitor commented on GitHub (May 23, 2025): The stale bot is probably the silliest thing people do on github. No developer wants to tackle fixing it, so let's just close it huh?
Author
Owner

@wolicape commented on GitHub (Jun 16, 2025):

Anything new about it ? I had to downgrade my security level by removing headers so it's a real concern.

<!-- gh-comment-id:2977688226 --> @wolicape commented on GitHub (Jun 16, 2025): Anything new about it ? I had to downgrade my security level by removing headers so it's a real concern.
Author
Owner

@AjianNie commented on GitHub (Sep 21, 2025):

2025.09 this bug is still affecting everyone, unbelievably.

<!-- gh-comment-id:3316071554 --> @AjianNie commented on GitHub (Sep 21, 2025): 2025.09 this bug is still affecting everyone, unbelievably.
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#2435
No description provided.