mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-26 01:45:54 +03:00
[GH-ISSUE #2218] NPM doesn´t redirect when url has HTTPS in local domains #1585
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#1585
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 @miguelcabanes on GitHub (Aug 24, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2218
Checklist
jc21/nginx-proxy-manager:latestdocker image?Describe the bug
I have Pihole with Local DNS Records:
When I add Proxy Host in NPM I do this...


The problem is that NPM does not redirect me correctly when it is https and when it is http it does it correctly, even though the http port is not 80 (also with 81). It is as if when the url has https it does not hook the port to do the redirection correctly. This does not happen with urls with http (regardless of any port)
So manager.home and truenas.home goes OK, but proxmox.home and portainer.home goes wrong.
There is one thing that seems strange to me and that is that if I add to my windows 10 hosts file the domains that do not work (proxmox.home and portainer.home pointing to the npm ip) and try again, this time NPM adds the port to the browser url and then it works.
There is some Custom Nginx Configuration to add in Proxy Host to force adding the port to url?
Thanks
Nginx Proxy Manager Version
v2.9.18
Expected behavior
Navigate though all urls without problem
Operating System
LXC with Ubuntu in Proxmox server
@the1ts commented on GitHub (Aug 24, 2022):
Am I reading correctly? you are pointing portainer.home at the portainer IP rather than the NPM IP?
@miguelcabanes commented on GitHub (Aug 24, 2022):
Yes.
It works fine when I put in the pihole the ip of the NPM (192.168.1.104) for portainer.home (currently 192.168.1.102) as you want to imply and it is correct. The problem is that if I do nslookup to portainer.home I need the ip that resolves to me not to be the one from NPM (192.168.1.104) but the real one from portainer.home (192.168.1.102). I can't think of any other way to make it work.
I hope I have explained myself well.
Thank you very much
@the1ts commented on GitHub (Aug 24, 2022):
I asked my question because the IP for connecting to portainer via NPM has to be the IP of NPM.
It sounds currently like you have NPM setup on one IP, but are connecting directly to the IPs of the services NPM is trying to proxy for. In short, NPM is never in the equation when you are hitting working or not working hostnames you mention above.
@miguelcabanes commented on GitHub (Aug 24, 2022):
Ok, thanks for the clarification I think I have to think of a better way to do it. Surely it is not necessary that in my NPM I have my local domains (portainer.home, proxmox.home). I think it is not useful to me in any way.
Thanks for everything