0

I have a Redhat Linux server. In that, I installed docker and run docker containers in it. Now I want to map a domain to docker containers by using Nginx.

What is the correct process to map domains by using Nginx, install Nginx as a container or Install Nginx in the Host server? Any references?

1
  • With, uh, DNS? this question makes no sense as presented. Dec 6, 2022 at 8:55

1 Answer 1

0

Basics Nginx is a webserver that can be used as a reverse proxy. I would suggest having a look at the nginx.conf file, where you can configure DNS redirects accordingly.

Host Nginx on host means you would need a port mapping( host -> docker container) of all the docker containers in order to redirect traffic to the correct container. Wouldn't suggest this.

Docker Nginx on docker on same docker network would be my suggested approach: you can use docker DNS and only map the nginx server itself(ports 80/443).

Maybe a tool based on nginx would help here, which already has lets encrypt support: https://nginxproxymanager.com/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.