mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-26 09:55:51 +03:00
[GH-ISSUE #286] Redirect http and https for one domain #255
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#255
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 @GrooveXT on GitHub (Feb 4, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/286
Hey,
I'm new to reverse proxy topic, maybe my question is silly. So sorry for that.
I have some software that tries to get its own let's encrypt certificate and needs port 80 and 443 passthrough. Nginx Proxy Manager let me only redirect either http or https from one domain to my host but not both.
How do I force it to redirect both protocols respectively ports? Or am I totally wrong with what a reverse proxy is doing?
Thx
@jc21 commented on GitHub (Feb 4, 2020):
You are correct, only one upstream can be configured. This kind of advanced idea could be implemented in future versions.
@GrooveXT commented on GitHub (Feb 4, 2020):
Thx for reply.
Is there a workaround?
@Cerothen commented on GitHub (Feb 15, 2020):
If I understand correctly you are looking to let a back end application perform the letsencrypt challenge and verification.
Unfortunately this is not possible since nginx performs SSL offloading on the 443 port. This means that while it is possible to direct port 80 to back end 80 and 443 to back end 443 when a client connects via HTTPS then nginx will offload that using whatever certificate it has and setup a new HTTPS connection to the backend.
Anywho if your looking to align the front ports with the back ports you can use the following, just stick it in your "advanced" section:
Alternatively you can use the port option indicated on the first page as the default destination for https incoming traffic and direct port 80 to an arbitrary alternate port with:
As an alternative to all of the above you could look at this ISSUE https://github.com/jc21/nginx-proxy-manager/issues/44 which is to add GUI support for hostnames in the streams section. An extension of that would be that we would need it to also run on 443 transparently (eg non matched stream hostnames go to the standard reverse proxy logic while matched traffic goes to the indicated stream destination
@geelenbert commented on GitHub (Mar 10, 2020):
I think i want to achieve something similar.
I have 2 domains: domain1.com and domain2.com.
I want domain1.com to function with Nginx reverse proxy as designed.
So creating proxy host like:
The second domain should point to one server, which handles the SSL offloaing by itself:
How should this be done ?
@Cerothen commented on GitHub (Mar 10, 2020):
At the time this is not natively possible by this project, this can't be achieved by the "proxy host" area since that would offload the SSL request. Since it would need to be handled by the "streams" area you would need to have more support in that area for SSL PREREAD.
Basically you want the following:
This has other issues though since it effectively replaces the client IP with 127.0.0.1 (or whatever you used), which leads into also wanting something like transparent proxying. Is there a particular reason you don't want to let NGINX handle the SSL offloading (or setting up a new HTTPS connection between the proxy and the backend)?
I would think it would be possible if you entered developed the configs and just left them in the appropriate folders in the data directory but you wouldn't be able to get the transparent part working and you wouldn't be able to manage it or reload it in the webui. YMMV
@geelenbert commented on GitHub (Mar 11, 2020):
I have VM that is completely self providing. It has its own Reverse proxy. This vm can run on a VPS, but i want to move it to a local server with better resources.
@sanderlv commented on GitHub (May 10, 2020):
I would like this:
HTTP sub1.domain.com:80 --> 192.168.1.142:8123
HTTPS sub1.domain.com:443 with letsencrypt --> 192.168.1.142:8123
HTTPS sub2.domain.com:443 with letsencrypt --> 192.168.1.254:443
HTTP sub3.domain.com:80 --> 192.168.1.99:80
HTTPS sub3.domain.com:443 with letsencrypt --> 192.168.1.99.443
Is this possible? I can get all traffic via HTTPS to several backend servers this way but if I have an HTTPS server with letsencrypt configured nothing happens from initiating browser side.
I also cannot seem to find any logging in the interface.
@chaptergy commented on GitHub (Oct 12, 2021):
These setups could be achieved if with ssl forwarding. The feature is currently under review, see https://github.com/jc21/nginx-proxy-manager/issues/853.
@george-viaud commented on GitHub (Aug 8, 2022):
I have the same need as the OP (both http and https forwarding for the same domain) for the same reason - Lets Encrypt is needed by my email server which is behind nginx proxy. It needs to be able to generate its own cert, but I want nginx manager to handle the front-end's cert. Forwarding of https and http to 443 and 80 respectively would solve my problem.
@Bluscream commented on GitHub (Sep 14, 2023):
Is this still not implemented? How hard can it be to listen on 2 ports on the same domain? Nginx and apache can do it
@ueukxvj commented on GitHub (Nov 12, 2023):
Unbelievable that this still not implemented. Deleting this stupid docker and installing nginx
@raykai commented on GitHub (Nov 19, 2024):
need this option too
@karlioscr7 commented on GitHub (Dec 3, 2024):
Todavia no se puede?