mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-14 19:36:24 +00:00
44 lines
1.1 KiB
Plaintext
44 lines
1.1 KiB
Plaintext
# 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 / {
|
|
# 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;
|
|
}
|
|
|
|
|
|
# websockets are passed to socat bridge
|
|
location /ws/ {
|
|
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;
|
|
}
|
|
|
|
# do not log healtchecks made against "/selfhosted"
|
|
location /selfhosted {
|
|
access_log off;
|
|
return 200 "OK";
|
|
}
|
|
} |