1
0
Fork 0
cmdui/nginx.conf

33 lines
630 B
Nginx Configuration File
Raw Normal View History

2017-10-29 22:06:41 +00:00
upstream api {
server 127.0.0.1:9090;
}
upstream react {
server 127.0.0.1:3000;
}
server {
listen 80 default_server;
server_name cmdui.local;
charset utf-8;
location ~ ^/api/ {
# Disable buffering to allow streaming logs in real-time
proxy_buffering off;
proxy_pass http://api;
}
# React websockets connection
location ~ ^/sockjs-node/ {
proxy_pass http://react;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location ~ / {
proxy_pass http://react;
}
}