NginxProxyManager / NginxProxyManager/nginx-proxy-manager

host.docker.internal not working with nginx (while curl does)

Open
#1,225 23 comments 11 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

  • 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
I've created a container with the standard setup including 1 tweak:
I've added

extra_hosts:
  - "host.docker.internal:host:gateway"

I can curl the gitlab from inside my container without any problem but access via domain from outside leads to 502 Bad Gateway error.

Nginx Proxy Manager Version
2.9.4

Expected behavior
I can reverse proxy to a gitlab instance running on the docker host on non standard port

Operating System
debian vm on proxmox with Intel x86 Architecture

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 standard jc21/nginx-proxy-manager:latest setup with the extra_hosts entry on the Debian VM, then compare the successful curl from inside the container with the external domain request. Inspect the Docker host mapping and Nginx proxy target for the GitLab instance on its non-standard port; done means the domain no longer returns 502.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, gitlab, nginx
Domain
infrastructure, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.