mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-26 01:45:54 +03:00
[GH-ISSUE #191] Only works with container internal IP #168
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#168
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Oujiii on GitHub (Aug 22, 2019).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/191
I'm not using the template simply because I don't know if this is the expected behaviour.
I just setup a new machine with npm and portainer. I ran npm first and it created a network called npm_default, so I run portainer passing the command --network=npm_default and it works as intended, all the three containers are in the same network.
While in the network, I can connect to 192.0.1.12:port (my internal ip) and it works. Also works it external-ip:port as it's listening on 0.0.0.0 by default, but for both portainer and npm admin page, if I try to proxy via http://192.0.1.12:9000 (portainer) and http://192.0.1.12:81 (npm admin) it doesn't work. It only proxies if I use the internal container IP + port. Is that intended? I didn't think so looking at the screenshots, that's why I'm asking.
I'm only worried as I'm deploying more containers, whenever I need to restart the node, the internal docker ips might not be the same anymore, thus messing all the proxies.
Thank you.
@beloniki commented on GitHub (Aug 22, 2019):
Hi.
You can use the portainer's container name instead ip as backend address.
@Oujiii commented on GitHub (Aug 22, 2019):
@beloniki Does that only work for any container in the same network?
I tested here and it worked. That's great. I'll keep this opened so I can get an answer on whether this is or isn't the intended behaviour.
@beloniki commented on GitHub (Sep 24, 2019):
@Oujiii to get answer, you can read this documentation https://docs.docker.com/v17.09/engine/userguide/networking/configure-dns/
As I know, it works only in the same network.
@henkisdabro commented on GitHub (Sep 10, 2020):
I'm experiencing issues with this too, I can only reach proxy hosts when configured with their internal ip as in 172.17.0.9 or similar. When entering either the service name or container name into the hosts box, they result in a 502 error. I have tried adding links inside my docker-compose on each service, but they don't seem to work either. My containers are all on the bridge network, and when restarting containers the IP's change. How can I make this work with docker DNS?
@chaptergy commented on GitHub (May 11, 2021):
See https://github.com/jc21/nginx-proxy-manager/pull/745#issuecomment-753558427
@TarikHaci commented on GitHub (Sep 23, 2023):
I have the same code as the fix here, but in my case I had also to EXPOSE my port in dockerfile, since I had a mapping in docker-compose 9000:port I though sufficient but it wasn't so I added the port which is EXPOSED to nginxproxymanager and not mapped and it worked.