我用 docker-compose.yml 配置了 nginx、web1、web2
nginx: build: ./nginx ports: - "80:80" expose: - "80" links: - "web1" - "web2"
auth: build: ./php expose: - "9000"
plan: build: ./php expose: - "9000"
nginx 里配了给 web1、web2 分别配了,web1.domain.com 和 web2.domain.com ,结果 web1 和 web2 不能相互访问,提示 connect refused,在宿主机可以访问 web1、web2,敢问各位大佬是什么原因。。在 web1 和 web2 容器里 ping 域名都是 127.0.0.1,应该是我在宿主机配置了 hosts 的原因
