Replies: 1 comment
-
Yes, looks like you are describing the exact use case of nginx-proxy. I think you should not focus on using the same cert. The idea of LE is to have a separate (free) cert for each (sub)domain you want. And the acme-companion all handles this for you. On serv-a.mydomain.com you set Port mappings I do not understand. There are only port mappings needed to the main nginx-proxy container. The proxy connections to the services happen internally in the docker network. nginx-proxy will use the exposed (dockerfile) port from the service. But you can also set If you need more help, posting the code you have so far could help! |
Beta Was this translation helpful? Give feedback.
-
Currently I have nginx-proxy listening on my domain (mydomain.com and *.mydomain.com) but I want to add another service.
Let's say I have two different services with their own docker-compile file. Lets call them ServiceA and ServiceB.
How can I redirect serv-a.mydomain.com to ServiceA and serv-b.mydomain.com to ServiceB? Preferably using the same LE certificate.
Do I need to declare VIRTUAL_HOST and LETSENCRYPT_HOST in each of the services' docker-compose? In that case would one not override the other?
Also, should they use the same nginx-proxy network? How about port mapping?
Help appreciated.
PS: I did see #2169 but that seems to be using only one service.
Beta Was this translation helpful? Give feedback.
All reactions