Tag: nginx reverse proxy

使用Docker –net = host并通过主机名连接到其他容器

我想设置一个Nginx的反向代理,工作正常,但如果我设置network_mode: "host"它停止工作,因为它无法找到其他码头集装箱的主机名。 我有一个web容器和一个nginx容器。 我得到以下错误: reverseproxy_1 | nginx: [emerg] host not found in upstream "web:80" in /etc/nginx/nginx.conf:10 reverseproxy_1 | nginx: [emerg] host not found in upstream "web:80" in /etc/nginx/nginx.conf:10 我的Nginx conf文件是: worker_processes 1; events { worker_connections 1024; } http { sendfile on; upstream docker-web { server web:80; } server { listen 8080; location / { proxy_pass […]