Skip to content

Instantly share code, notes, and snippets.

@alo9507
Created Oct 24, 2020
Embed
What would you like to do?
upstream client {
server client:3000;
}
upstream api {
server api:3001;
}
server {
listen 80;
location / {
proxy_pass http://client;
proxy_set_header Host $host;
}
location /sockjs-node {
proxy_pass http://client;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
location /api {
rewrite /api/(.*) /$1 break;
proxy_pass http://api;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment