-
Notifications
You must be signed in to change notification settings - Fork 3
/
nginx.local.conf
71 lines (61 loc) · 1.94 KB
/
nginx.local.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
server {
listen 80;
listen [::]:80;
server_name gratitude.citizenwallet.xyz;
server_tokens off;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
root /var/www/html;
if (!-f /var/www/config/community.json) {
rewrite ^ /dashboard/config redirect;
}
}
location /uploads/ {
alias /var/www/uploads/;
expires 5m;
add_header Cache-Control "public";
}
location = /config/community.json {
alias /var/www/config/community.json;
}
resolver 127.0.0.11 valid=30s;
location = /indexer {
set $upstream http://host.docker.internal:3001;
proxy_pass $upstream;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location ^~ /indexer/ {
set $upstream http://host.docker.internal:3001;
rewrite ^/indexer/(.*) /$1 break;
proxy_pass $upstream$;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location = /dashboard {
set $upstream http://host.docker.internal:3000/dashboard;
proxy_pass $upstream;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location ^~ /dashboard/ {
set $upstream http://host.docker.internal:3000;
proxy_pass $upstream$request_uri;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}