Skip to content

Commit

Permalink
Add example triton 1 pythnet nginx configuration (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
tompntn authored Aug 22, 2022
1 parent afd429e commit 49fa49b
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions doc/example-nginx-triton1.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,53 @@ http {

client_max_body_size 0;

upstream backend {
server YOUR_NODE.rpcpool.com:443;
# Pythnet, listening on ports 7799:7800
upstream pythnet_backend {
server YOUR_PYTHNET_NODE.rpcpool.com:443;
keepalive 4;
}
server {
listen 7800;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_pass https://pythnet_backend/YOUR_PYTHNET_AUTH_TOKEN_HERE/;
proxy_set_header Host YOUR_PYTHNET_NODE.rpcpool.com;
}
}
server {
listen 7799;
location / {
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_pass https://pythnet_backend/YOUR_PYTHNET_AUTH_TOKEN_HERE/;
proxy_set_header Host YOUR_PYTHNET_NODE.rpcpool.com;
}
}

# Solana Mainnet, listening on ports 7899:7900
upstream mainnet_backend {
server YOUR_MAINNET_NODE.rpcpool.com:443;
keepalive 4;
}
server {
listen 7900;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_pass https://backend/YOUR_AUTH_TOKEN_HERE/;
proxy_set_header Host YOUR_NODE.rpcpool.com;
proxy_pass https://mainnet_backend/YOUR_MAINNET_AUTH_TOKEN_HERE/;
proxy_set_header Host YOUR_MAINNET_NODE.rpcpool.com;
}
}
server {
listen 7899;
location / {
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_pass https://backend/YOUR_AUTH_TOKEN_HERE/;
proxy_set_header Host YOUR_NODE.rpcpool.com;
proxy_pass https://mainnet_backend/YOUR_MAINNET_AUTH_TOKEN_HERE/;
proxy_set_header Host YOUR_MAINNET_NODE.rpcpool.com;
}
}
}

0 comments on commit 49fa49b

Please sign in to comment.