Repository navigation
Expand file tree
/
Copy pathnginx.conf.example
More file actions
103 lines (86 loc) · 2.79 KB
/
Copy pathnginx.conf.example
File metadata and controls
103 lines (86 loc) · 2.79 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
server {
listen 80;
listen [::]:80;
server_name <host_name>;
server_tokens off;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://<host_name>$request_uri;
}
}
server {
listen 443 default_server ssl;
listen [::]:443 ssl;
http2 on;
server_name <host_name>;
ssl_certificate /etc/nginx/ssl/live/<host_name>/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/<host_name>/privkey.pem;
location / {
if (!-f /var/www/config/community.json) {
rewrite ^ /dashboard/config redirect;
}
set $upstream http://<docker_host_ip>:3002;
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 /.well-known/apple-app-site-association {
default_type application/json;
alias /var/www/html/.well-known/apple-app-site-association;
}
location /.well-known/assetlinks.json {
default_type application/json;
alias /var/www/html/.well-known/assetlinks.json;
}
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://<docker_host_ip>: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://<docker_host_ip>: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://<docker_host_ip>: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://<docker_host_ip>: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;
}
}