forked from adsb-related-code/tar1090
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
77 lines (72 loc) · 1.92 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
69
70
71
72
73
74
75
76
77
# nginx configuration for tar1090
location /INSTANCE/data/ {
alias SOURCE_DIR/;
location ~ aircraft\.json$ {
add_header Cache-Control "public, max-age=0";
}
location /INSTANCE/data/traces/ {
location ~ trace_recent {
gzip off;
add_header Cache-Control "public, max-age=10";
add_header Content-Encoding "gzip";
}
location ~ trace_full {
gzip off;
add_header Cache-Control "public, max-age=60";
add_header Content-Encoding "gzip";
}
}
location ~ globe_.*\.json$ {
gzip off;
add_header Cache-Control "public, max-age=0";
add_header Content-Encoding "gzip";
}
}
location /INSTANCE/globe_history/ {
alias /var/globe_history/;
gzip off;
add_header Cache-Control "public, max-age=600";
add_header Content-Encoding "gzip";
}
location /INSTANCE/chunks/ {
alias /run/SERVICE/;
location ~ chunk_.*\.gz$ {
add_header Cache-Control "public, max-age=1209600";
add_header Content-Type "application/json";
add_header Content-Encoding "gzip";
}
location ~ current_.*\.gz$ {
add_header Cache-Control "must-revalidate";
add_header Content-Type "application/json";
add_header Content-Encoding "gzip";
}
location ~ .*\.json$ {
add_header Cache-Control "public, max-age=0";
}
}
location /INSTANCE {
alias HTMLPATH/;
try_files $uri $uri/ =404;
gzip_static on;
location ~ db.*\.json$ {
add_header Cache-Control "public, max-age=1209600";
}
location ~ .*\.png$ {
add_header Cache-Control "public, max-age=1209600";
}
location ~ .*\.gif$ {
add_header Cache-Control "public, max-age=1209600";
}
location ~ index.html$ {
add_header Cache-Control "public, max-age=300";
}
location ~ config.js$ {
add_header Cache-Control "public, max-age=10";
}
location ~ .*\.js$ {
add_header Cache-Control "public, max-age=1209600";
}
location ~ .*\.css$ {
add_header Cache-Control "public, max-age=1209600";
}
}