C
C
CBuH2022-02-11 11:23:46
Nginx
CBuH, 2022-02-11 11:23:46

Connecting to Nginx docker container by domain name?

Good afternoon, I raised Nginx in the docker, dns records are configured, but when I access the site by name, I get an error that the site was not found, everything opens by IP address and works as it should.
If you run Nginx not from a container, but installed on a host, then everything is opened by both the site name and its IP.
How can you correct?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vadim, 2022-02-11
@Viji

And why is such a launch option not suitable or what?
docker run -it --rm -d -p host-ip:80:80 --name web nginx

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question