NginxProxyManager / NginxProxyManager/nginx-proxy-manager

Please correct /app/templates/_location.conf

Open Beginner friendly
#4,759 2 comments 3 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

/app/templates/_location.conf

Now you have:

{{ advanced_config }}

proxy_set_header Host $host;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;

proxy_pass {{ forward_scheme }}://{{ forward_host }}:{{ forward_port }}{{ forward_path }};

please change the order => 1st your config, then the user's config. like this:

proxy_set_header Host $host;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;

proxy_pass {{ forward_scheme }}://{{ forward_host }}:{{ forward_port }}{{ forward_path }};

{{ advanced_config }}

Otherwise your configuration overwrites the user configuration, which is not good :)

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 with /app/templates/_location.conf and inspect how the advanced_config block is placed relative to the proxy directives. Verify the rendered location configuration preserves the requested ordering, with the template's proxy settings before the user's advanced configuration. Done when the generated configuration reflects that order without unrelated changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
nginx
Domain
devops
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.