Created
September 8, 2023 09:20
-
-
Save vodolaz/3be5bb7539ddf35f2ce9ff0399b465ca to your computer and use it in GitHub Desktop.
neon nginx config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### for tokio DC | |
################################### | |
####### | |
####### http | |
####### | |
################################### | |
log_format upstreamlog '[$time_local] $remote_addr - $remote_user - $server_name $host to: $upstream_addr: $request $status upstream_response_time $upstream_response_time msec $msec request_time $request_time'; | |
upstream sol_node { | |
server 127.0.0.1:8899; | |
#check interval=3000 rise=2 fall=3 timeout=5000 type=http; | |
#check_http_send 'GET /health HTTP/1.0\r\n\r\n'; | |
#check_http_expect_alive http_2xx http_3xx; | |
keepalive 300; | |
} | |
server { | |
listen xxx.xxx.xxx.xxx:8899; | |
server_name sol-rpc.xxx-test.xxx.xyz ; | |
access_log /var/log/nginx/sol_rpc.log upstreamlog; | |
set $upstream 'sol_node'; | |
location / { | |
proxy_set_header Host $host; | |
proxy_set_header X-real-ip $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for,$server_addr; | |
proxy_pass http://$upstream; | |
} | |
} | |
################################### | |
####### | |
####### websocet | |
####### | |
################################### | |
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
upstream sol_node2 { | |
server 127.0.0.1:8900 ; | |
# check interval=3000 rise=2 fall=3 timeout=5000 type=http; | |
#check_http_send 'GET /health HTTP/1.0\r\n\r\n'; | |
#check_http_expect_alive http_2xx http_3xx; | |
keepalive 300; | |
} | |
server { | |
listen xxx.xxx.xxx.xxx:8900; | |
server_name sol-rpc.xxx-test.xxx.xyz ; | |
access_log /var/log/nginx/sol_ws.log upstreamlog; | |
set $upstream 'sol_node2'; | |
location / { | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
proxy_pass http://$upstream; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment