没有使用docker的使用的时候我直接配置了nginx.cnf,把80端口映射到8201,可以使用,但是使用了docker以后,用了原本的那个nginx.cnf,一访问网页就报错。。求解。。谢谢
Dockerfile
FROM nginx
COPY ./nginx.conf /etc/nginx/nginx.conf
COPY ./index.html /usr/share/nginx/html
nginx.cnf
server {
listen 80;
#listen somename:8080;
#server_name somename alias another.alias;
location / {
proxy_pass http://127.0.0.1:8201;
}
}
启动命令
docker run -d -p 8888:80 binginx
访问localhost:8888以后
502 Bad Gatewaynginx/1.13.11
求解,谢谢大佬们。。或者给个QQ也行。。谢谢
Dockerfile
FROM nginx
COPY ./nginx.conf /etc/nginx/nginx.conf
COPY ./index.html /usr/share/nginx/html
nginx.cnf
server {
listen 80;
#listen somename:8080;
#server_name somename alias another.alias;
location / {
proxy_pass http://127.0.0.1:8201;
}
}
启动命令
docker run -d -p 8888:80 binginx
访问localhost:8888以后
502 Bad Gatewaynginx/1.13.11
求解,谢谢大佬们。。或者给个QQ也行。。谢谢