Answer the question
In order to leave comments, you need to log in
Change nginx server_name in docker container?
Hello. After the vagrant, I try to delve into the docker and can’t enter it in any way. Here I have let's say nginx nginx_test.conf
server {
listen 80;
server_name localhost1.loc;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
version: "3.3"
services:
nginx:
image: nginx
ports:
- "80:80"
volumes:
- "./nginx/nginx_test.conf:/etc/nginx/conf.d/default.conf"
Answer the question
In order to leave comments, you need to log in
The nginx, which is in the docker and belongs to the application, usually listens on http to everything and gives its application.
And domains, SSL, etc. already winding up on an external nginx, which is outside the docker. With proxy pass to docker.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question