1

I have several hosts service1.example.com, service2.example.com behind Nginx proxy manager, where the NPM handles ssl and lets encrypt acme. Now I installed a new host newhost.exmaple.com that requires handling its own certificate generation. I want to make the NPM forward all http and https queries of newhost.exmaple.com to an internal ipv4 address without proxying.

I had a look at streams, but a stream has no domain name recognition filter. The advanced docs do not contain what I am looking for.

I know Nginx is capable of this, related:

I am running the NPM in docker.

1 Answer 1

0

Try this if you want NPM to handle SSL

  1. Create a root NPM with no SSL
  2. create two other NPM with their own SSL
  3. Forward each domain you want from the root to the specified NPM with SSL using proxy host

Note: you should know about docker networking and ports in this case, I'm sure you knew

As an alternative you can use in app SSL handling thus in order to do it you must create the root NPM without SSL and then inside docker containers, handle it with cert-bot for example...

If you decided to try out new things:

Apparently you can use HAproxy, it has this feature out of the box

you can achieve your goal even without the help of Nginx proxy manager and HAproxy, if you are willing to do it of course ( hard way )

How about setting up a DNS server like bind ( I'm new to it and not an expert, yet I recommend it ) and do everything Nginx proxy manager does from scratch, then use redirections and docker for it. ( This is the general approach as I'm trying to implement it myself, but as far as I know this is the way. I will update this answer immediately with details after I accomplished it myself )

Generally speaking, by doing everything NPM does from scratch, I mean setting up DNS server and redirecting and do all the mapping to the folders and such

then you can install SSL using Cert-bot and Let's Encrypt or manually configure it for each project you may have whether inside or outside docker ( Other servers/pc on the network, basically creating and isolating DNS server from service servers and/or nodes ).

However, as you might have also guessed as the quick solution, If you are willing to achieve this goal as soon as possible regardless of how naive it may sound for the sake of your business plans, you can buy another static IP, another router/modem, a raspberry pi or some other pc/server, do all those stuff again, as a temporary cure till you can do the recommended

1
  • Thanks, I think HAproxy sounds best Commented Jun 19 at 19:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .