-
Notifications
You must be signed in to change notification settings - Fork 3k
Redirect http and https for one domain #286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You are correct, only one upstream can be configured. This kind of advanced idea could be implemented in future versions. |
Thx for reply. |
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 #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 |
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.
The second domain should point to one server, which handles the SSL offloaing by itself:
How should this be done ? |
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 |
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. |
I would like this: HTTP sub1.domain.com:80 --> 192.168.1.142:8123 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. |
These setups could be achieved if with ssl forwarding. The feature is currently under review, see #853. |
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. |
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 |
Unbelievable that this still not implemented. Deleting this stupid docker and installing nginx |
need this option too |
Todavia no se puede? |
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
The text was updated successfully, but these errors were encountered: