robosats/nodeapp/nginx/local.conf

43 lines
1012 B
Plaintext
Raw Normal View History

# first we declare our upstream server, which is our http-server application
upstream robosats_http_server {
server localhost:9000;
}
upstream robosats_websocket {
server localhost:81;
}
# now we declare our main server
server {
listen 12596;
server_name robosats_client;
# location /static {
# alias /usr/src/static;
# }
location / {
# requests are passed to npm Http-Server
proxy_pass http://robosats_http_server;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
}
location /ws/ {
# websockets are passed to socat bridge
proxy_pass http://robosats_websocket;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
location = /favicon.ico {
alias /usr/src/robosats/static/assets/images/favicon-96x96.png;
}
}