Created
October 24, 2020 20:52
-
-
Save alo9507/bc35d5b3fe0e3f8fadb0a68263296d08 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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