Commit 32b4053a8b511e68c37d916ff1267123d7e35511
Committed by
xp.Huang
1 parent
1c4c9081
Feat/dockerfile
Showing
1 changed file
with
49 additions
and
0 deletions
default.conf
0 → 100644
1 | +server { | ||
2 | + listen 80; | ||
3 | + listen [::]:80; | ||
4 | + server_name 192.168.1.48; | ||
5 | + #charset koi8-r; | ||
6 | + #access_log /var/log/nginx/host.access.log main; | ||
7 | + | ||
8 | + root /usr/share/nginx/html; | ||
9 | + index index.html index.htm; | ||
10 | + try_files $uri $uri/ /index.html; | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + location /api/ { | ||
15 | + proxy_pass http://192.168.1.48:8080; | ||
16 | + proxy_http_version 1.1; | ||
17 | + proxy_set_header Upgrade $http_upgrade; | ||
18 | + proxy_set_header Connection "Upgrade"; | ||
19 | + proxy_set_header Host $host; | ||
20 | + proxy_cache_bypass $http_upgrade; | ||
21 | + } | ||
22 | + | ||
23 | + location /yt/ { | ||
24 | + proxy_pass http://192.168.1.48:8080; | ||
25 | + proxy_http_version 1.1; | ||
26 | + proxy_set_header Upgrade $http_upgrade; | ||
27 | + proxy_set_header Connection "Upgrade"; | ||
28 | + proxy_set_header Host $host; | ||
29 | + proxy_cache_bypass $http_upgrade; | ||
30 | + } | ||
31 | + | ||
32 | + location /upload/ { | ||
33 | + proxy_pass http://192.168.1.48:8080; | ||
34 | + proxy_http_version 1.1; | ||
35 | + proxy_set_header Upgrade $http_upgrade; | ||
36 | + proxy_set_header Connection "Upgrade"; | ||
37 | + proxy_set_header Host $host; | ||
38 | + proxy_cache_bypass $http_upgrade; | ||
39 | + } | ||
40 | + | ||
41 | + #error_page 404 /404.html; | ||
42 | + | ||
43 | + # redirect server error pages to the static page /50x.html | ||
44 | + # | ||
45 | + error_page 500 502 503 504 /50x.html; | ||
46 | + location = /50x.html { | ||
47 | + root /usr/share/nginx/html; | ||
48 | + } | ||
49 | +} |