Skip to content

Commit 674944d

Browse files
committed
add bisontrails example nginx config
1 parent cc159c3 commit 674944d

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

doc/example-nginx-bisontrails.conf

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# generate YOUR_BASE64_USERPASS with `echo -n user:password | base64 -w0`
2+
# replace YOUR_NODE and YOUR_BASE64_USERPASS
3+
# docker run -v /path/to/nginx-bisontrails.conf:/etc/nginx/nginx.conf:ro -p 7899:7899 -p 7900:7900 -d docker.io/nginx
4+
5+
worker_processes 1;
6+
7+
events {}
8+
9+
http {
10+
include /etc/nginx/mime.types;
11+
12+
rewrite_log on;
13+
14+
keepalive_requests 2147483647; # int32 max
15+
16+
client_max_body_size 0;
17+
18+
upstream backend {
19+
server YOUR_NODE:443;
20+
keepalive 4;
21+
}
22+
23+
server {
24+
listen 7900;
25+
location / {
26+
proxy_set_header Upgrade $http_upgrade;
27+
proxy_set_header Connection "Upgrade";
28+
proxy_pass https://backend/ws;
29+
proxy_set_header Authorization "Basic YOUR_BASE64_USERPASS";
30+
proxy_set_header Host YOUR_NODE;
31+
}
32+
}
33+
server {
34+
listen 7899;
35+
location / {
36+
proxy_http_version 1.1;
37+
proxy_set_header Connection "";
38+
proxy_pass https://backend/rpc;
39+
proxy_set_header Authorization "Basic YOUR_BASE64_USERPASS";
40+
proxy_set_header Host YOUR_NODE;
41+
}
42+
}
43+
}

0 commit comments

Comments
 (0)