Skip to content

Commit 49fa49b

Browse files
authored
Add example triton 1 pythnet nginx configuration (#261)
1 parent afd429e commit 49fa49b

File tree

1 file changed

+31
-6
lines changed

1 file changed

+31
-6
lines changed

doc/example-nginx-triton1.conf

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,53 @@ http {
1414

1515
client_max_body_size 0;
1616

17-
upstream backend {
18-
server YOUR_NODE.rpcpool.com:443;
17+
# Pythnet, listening on ports 7799:7800
18+
upstream pythnet_backend {
19+
server YOUR_PYTHNET_NODE.rpcpool.com:443;
1920
keepalive 4;
2021
}
22+
server {
23+
listen 7800;
24+
location / {
25+
proxy_http_version 1.1;
26+
proxy_set_header Upgrade $http_upgrade;
27+
proxy_set_header Connection "Upgrade";
28+
proxy_pass https://pythnet_backend/YOUR_PYTHNET_AUTH_TOKEN_HERE/;
29+
proxy_set_header Host YOUR_PYTHNET_NODE.rpcpool.com;
30+
}
31+
}
32+
server {
33+
listen 7799;
34+
location / {
35+
proxy_http_version 1.1;
36+
proxy_set_header Connection "";
37+
proxy_pass https://pythnet_backend/YOUR_PYTHNET_AUTH_TOKEN_HERE/;
38+
proxy_set_header Host YOUR_PYTHNET_NODE.rpcpool.com;
39+
}
40+
}
2141

42+
# Solana Mainnet, listening on ports 7899:7900
43+
upstream mainnet_backend {
44+
server YOUR_MAINNET_NODE.rpcpool.com:443;
45+
keepalive 4;
46+
}
2247
server {
2348
listen 7900;
2449
location / {
2550
proxy_http_version 1.1;
2651
proxy_set_header Upgrade $http_upgrade;
2752
proxy_set_header Connection "Upgrade";
28-
proxy_pass https://backend/YOUR_AUTH_TOKEN_HERE/;
29-
proxy_set_header Host YOUR_NODE.rpcpool.com;
53+
proxy_pass https://mainnet_backend/YOUR_MAINNET_AUTH_TOKEN_HERE/;
54+
proxy_set_header Host YOUR_MAINNET_NODE.rpcpool.com;
3055
}
3156
}
3257
server {
3358
listen 7899;
3459
location / {
3560
proxy_http_version 1.1;
3661
proxy_set_header Connection "";
37-
proxy_pass https://backend/YOUR_AUTH_TOKEN_HERE/;
38-
proxy_set_header Host YOUR_NODE.rpcpool.com;
62+
proxy_pass https://mainnet_backend/YOUR_MAINNET_AUTH_TOKEN_HERE/;
63+
proxy_set_header Host YOUR_MAINNET_NODE.rpcpool.com;
3964
}
4065
}
4166
}

0 commit comments

Comments
 (0)