2
landing.example.com:10000
には、うまく動作するWebサーバーがあります。これは、ポート10000
を公開するDockerコンテナです。 IPアドレスは172.17.0.2
です。nginxが502の悪いゲートウェイを与えるとき、Howtoはデバッグしますか?
ポート80
でnginxリバースプロキシを使用し、訪問したURLに応じて別のDockerコンテナに訪問者を送ります。
server {
listen 80;
server_name landing.example.com;
location/{
proxy_pass http://172.17.0.2:10000/;
}
access_log /landing-access.log;
error_log /landing-error.log info;
}
私はこれを行うと、私は502 Bad Gateway
を取得し、ログが
2016/04/14 16:58:16 [error] 413#413: *84 connect()
failed (111: Connection refused) while connecting to upstream, client:
xxx.xxx.xxx.xxx, server: landing.example.com, request: "GET/HTTP/1.1",
upstream: "http://172.17.0.2:10000/", host: "landing.example.com"