Skip to content

Commit 4380147

Browse files
author
Jeff Schroeder
committed
Update triton one nginx config
Delay resolution of the proxy until the first request. This allows the nginx instance to start when using `standalone-dev-nginx.conf` but perhaps with a provider other than triton one. Without this, nginx errors out with the following log line: 2021/09/16 13:57:36 [emerg] 5077#0: host not found in upstream "YOUR_SERVER.rpcpool.com" in triton-one-virt-server-config.conf:59
1 parent 94fc204 commit 4380147

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

doc/nginx-configs/triton-one-virt-server-config.conf

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@
1212
server {
1313
listen 7902;
1414

15+
# e.g: companyname1.rpcpool.com
16+
set $upstream_host YOUR_SERVER;
17+
set $auth_token REPLACE_ME_WITH_YOUR_AUTH_TOKEN;
18+
1519
location / {
1620
try_files /nonexistent-used-for-try-testing @$http_upgrade;
1721
}
1822

1923
location @websocket {
2024
# With authentication
21-
proxy_pass https://YOUR_SERVER.rpcpool.com/REPLACE_ME_WITH_YOUR_AUTH_TOKEN$request_uri;
25+
proxy_pass https://$upstream_host/$auth_token$request_uri;
2226

2327
# Without authentication, i.e. IP allow listed
2428
#proxy_pass https://YOUR_SERVER.rpcpool.com$request_uri;
@@ -33,10 +37,10 @@ server {
3337

3438
location @ {
3539
# With authentication
36-
proxy_pass https://YOUR_SERVER.rpcpool.com/REPLACE_ME_WITH_YOUR_AUTH_TOKEN$request_uri;
40+
proxy_pass https://$upstream_host/$auth_token$request_uri;
3741

3842
# Without authentication, i.e. IP allow listed
39-
#proxy_pass https://YOUR_SERVER.rpcpool.com$request_uri;
43+
#proxy_pass https://$upstream_host$request_uri;
4044
proxy_http_version 1.1;
4145
proxy_set_header Host $proxy_host;
4246
proxy_set_header Connection "";
@@ -54,12 +58,16 @@ server {
5458
server {
5559
listen 7802;
5660

61+
# e.g: companyname1.rpcpool.com
62+
set $upstream_host YOUR_SERVER;
63+
set $auth_token REPLACE_ME_WITH_YOUR_AUTH_TOKEN;
64+
5765
location / {
5866
# With authentication
59-
proxy_pass https://YOUR_SERVER.rpcpool.com/REPLACE_ME_WITH_YOUR_AUTH_TOKEN;
67+
proxy_pass https://$upstream_host/$auth_token;
6068

6169
# Without authentication, i.e. IP allow listed
62-
#proxy_pass https://YOUR_SERVER.rpcpool.com;
70+
#proxy_pass https://$upstream_host;
6371
proxy_http_version 1.1;
6472
proxy_set_header Host $proxy_host;
6573
# websocket requirements

0 commit comments

Comments
 (0)