mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-13 02:46:28 +00:00
69 lines
1.7 KiB
Nginx Configuration File
69 lines
1.7 KiB
Nginx Configuration File
|
worker_processes auto;
|
||
|
|
||
|
events {
|
||
|
worker_connections 1024;
|
||
|
}
|
||
|
|
||
|
http {
|
||
|
|
||
|
# Every robosat coordinators socat tor bridge is an upstream.
|
||
|
# So far only the experimental coordinator is available.
|
||
|
upstream experimental_coordinator {
|
||
|
server localhost:81;
|
||
|
}
|
||
|
|
||
|
server {
|
||
|
|
||
|
listen 12596;
|
||
|
server_name robosats_client;
|
||
|
|
||
|
include /etc/nginx/mime.types;
|
||
|
|
||
|
location / {
|
||
|
root /usr/src/robosats;
|
||
|
try_files $uri $uri/ /basic.html;
|
||
|
}
|
||
|
|
||
|
location /pro/ {
|
||
|
root /usr/src/robosats;
|
||
|
try_files $uri $uri/ /pro.html;
|
||
|
}
|
||
|
|
||
|
location /static/ {
|
||
|
alias /usr/src/robosats/static/;
|
||
|
autoindex on;
|
||
|
}
|
||
|
|
||
|
# we pass avatars, websockets and api to the coordinator(s) socat bridges
|
||
|
location /static/assets/avatars/ {
|
||
|
proxy_pass http://experimental_coordinator;
|
||
|
}
|
||
|
|
||
|
location /api/ {
|
||
|
proxy_pass http://experimental_coordinator;
|
||
|
proxy_http_version 1.1;
|
||
|
proxy_set_header Upgrade $http_upgrade;
|
||
|
proxy_set_header Connection "Upgrade";
|
||
|
proxy_set_header Host $host;
|
||
|
}
|
||
|
|
||
|
location /ws/ {
|
||
|
proxy_pass http://experimental_coordinator;
|
||
|
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";
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|