-
Notifications
You must be signed in to change notification settings - Fork 5
/
nginx.conf
68 lines (54 loc) · 1.24 KB
/
nginx.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
server {
listen 8080;
root /home/admin/autoDV/build;
index index.html;
default_type 'text/html';
charset utf-8;
gzip on;
gzip_min_length 100;
gzip_buffers 4 16k;
gzip_http_version 1.1;
gzip_comp_level 9;
gzip_types text/plain
application/javascript
application/x-javascript
text/css
application/xml
text/javascript
application/x-httpd-
php;
location ~ (?:api\.js)$ {
expires -1;
}
location ~ \.(?:html|htm|m3u8|manifest|appcache|html?|xml|json)$ {
expires -1;
add_header Cache-Control s-maxage=31536000;
}
location ~ .*\.(?:ts)$ {
expires 15s;
}
# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
add_header Access-Control-Allow-Origin *;
expires 1M;
}
location /servers {
proxy_pass http://127.0.0.1:3002/;
}
location / {
try_files $uri /index.html;
}
}
server {
listen 80;
server_name dataview.ashesborn.cloud;
location / {
proxy_pass http://127.0.0.1:8080;
}
location /APISource/ {
proxy_pass $arg_proxyurl;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_hide_header X-Powered-By;
}
}