-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdefault.conf
74 lines (61 loc) · 2.56 KB
/
default.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
72
73
74
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name aijiangsb.com;
ssl_certificate /etc/nginx/aijiangsb.com.crt;
ssl_certificate_key /etc/nginx/aijiangsb.com.key;
add_header Strict-Transport-Security "max-age=31536000" always;
ssl_trusted_certificate /etc/nginx/aijiangsbFull.crt;
ssl_stapling on;
ssl_stapling_verify on;
error_page 497 301 https://$http_host$request_uri;
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
location / {
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
location /api/file/uploadSlice {
proxy_pass http://172.17.0.1:9090/file/uploadSlice/;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_read_timeout 99999;
proxy_connect_timeout 99999;
proxy_send_timeout 99999;
}
location /api/file/merge {
proxy_pass http://172.17.0.1:9090/file/merge;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_read_timeout 99999;
proxy_connect_timeout 99999;
proxy_send_timeout 99999;
}
location /api/ {
proxy_pass http://172.17.0.1:9090/;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Protocol $scheme;
}
location /preview {
proxy_pass http://172.17.0.1:8012;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
}
location /socket.io/ {
# 此处改为 socket.io 后端的 ip 和端口即可
proxy_pass http://172.17.0.1:27000;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}