I am trying to hit a Go chat server through an Nginx proxy, but the Nginx upstream does not seem to be working. It does serve up my client just fine (a React app) but I can not seem to hit the Go server (chat). I am new to using Nginx, do you see a missing config or something? The upstreams are all separate Docker containers.
upstream client {
server client:3000;
}
upstream api {
server api:7777;
}
upstream chat {
server chat:9000;
}
server {
listen 80;
location /chat {
proxy_pass http://chat;
}
location / {
proxy_pass http://client;
}
location /sockjs-node {
proxy_pass http://client;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
location /oracle {
proxy_pass http://api;
}
location /api/payment {
proxy_pass http://api;
}
location /signin {
proxy_pass http://api;
}
location /register {
proxy_pass http://api;
}
}