NginxProxyManager / NginxProxyManager/nginx-proxy-manager

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

Open
#3,678 21 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
34.2k
Forks
3.9k
Avg merge
21h 12m
Merged PRs (30d)
20

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior with the nginx-proxy-manager:latest Docker image and the configuration shown in the Advanced tab. Inspect the generated proxy_host .conf file and compare it with the Custom locations configuration. Done means the forwarded headers apply without sending traffic to the OpenResty landing page or taking the proxy host offline.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, nginx
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.