2020-01-03 21:16:40 +01:00
|
|
|
# nginx configuration for tar1090
|
|
|
|
|
location /INSTANCE/data/ {
|
|
|
|
|
alias SOURCE_DIR/;
|
|
|
|
|
location ~ aircraft\.json$ {
|
|
|
|
|
add_header Cache-Control "public, max-age=0";
|
|
|
|
|
}
|
2020-01-11 16:49:15 +01:00
|
|
|
location /INSTANCE/data/traces/ {
|
2020-01-19 12:38:39 +01:00
|
|
|
location ~ trace_recent {
|
2020-01-31 01:08:40 +01:00
|
|
|
gzip off;
|
2021-03-21 14:13:34 +01:00
|
|
|
add_header Cache-Control "private, max-age=2";
|
2020-01-31 04:43:20 +01:00
|
|
|
add_header Content-Encoding "gzip";
|
2020-01-19 12:38:39 +01:00
|
|
|
}
|
|
|
|
|
location ~ trace_full {
|
2020-01-31 01:08:40 +01:00
|
|
|
gzip off;
|
2021-03-21 14:13:34 +01:00
|
|
|
add_header Cache-Control "private, max-age=2";
|
2020-01-31 04:43:20 +01:00
|
|
|
add_header Content-Encoding "gzip";
|
2020-01-19 12:38:39 +01:00
|
|
|
}
|
2020-01-03 21:16:40 +01:00
|
|
|
}
|
|
|
|
|
location ~ globe_.*\.json$ {
|
2020-01-31 04:43:20 +01:00
|
|
|
gzip off;
|
2020-02-23 17:07:36 +01:00
|
|
|
add_header Cache-Control "public, max-age=0";
|
2020-01-31 02:47:01 +01:00
|
|
|
add_header Content-Encoding "gzip";
|
2020-01-03 21:16:40 +01:00
|
|
|
}
|
2020-10-23 02:07:40 +02:00
|
|
|
location ~ globe.*\.binCraft$ {
|
2020-09-29 00:11:18 +02:00
|
|
|
gzip off;
|
|
|
|
|
add_header Cache-Control "public, max-age=0";
|
|
|
|
|
add_header Content-Encoding "gzip";
|
|
|
|
|
}
|
2020-01-03 21:16:40 +01:00
|
|
|
}
|
|
|
|
|
|
2020-01-19 12:38:39 +01:00
|
|
|
location /INSTANCE/globe_history/ {
|
|
|
|
|
alias /var/globe_history/;
|
2021-03-24 11:39:54 +01:00
|
|
|
gzip on;
|
|
|
|
|
|
|
|
|
|
location ~ /acas/ {
|
|
|
|
|
default_type text/plain;
|
|
|
|
|
add_header Cache-Control "private, max-age=5";
|
|
|
|
|
|
|
|
|
|
gzip_static on;
|
2021-03-24 21:23:38 +01:00
|
|
|
#gunzip on;
|
2021-03-24 11:39:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location ~ ....-..-.. {
|
|
|
|
|
rewrite "^(.*)/globe_history/(....)-(..)-(..)/(.*)$" "$1/globe_history/$2/$3/$4/$5" last;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location ~ traces/ {
|
|
|
|
|
gzip off;
|
|
|
|
|
add_header Cache-Control "public, max-age=1209600";
|
|
|
|
|
add_header Content-Encoding "gzip";
|
|
|
|
|
}
|
|
|
|
|
location ~ heatmap/ {
|
|
|
|
|
gzip off;
|
|
|
|
|
add_header Cache-Control "public, max-age=1209600";
|
|
|
|
|
add_header Content-Encoding "gzip";
|
|
|
|
|
}
|
2020-01-19 12:38:39 +01:00
|
|
|
}
|
|
|
|
|
|
2020-01-03 21:16:40 +01:00
|
|
|
location /INSTANCE/chunks/ {
|
|
|
|
|
alias /run/SERVICE/;
|
|
|
|
|
location ~ chunk_.*\.gz$ {
|
2020-11-13 20:12:07 +01:00
|
|
|
add_header Cache-Control "public, max-age=86400";
|
2020-01-03 21:16:40 +01:00
|
|
|
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";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-28 18:08:46 +01:00
|
|
|
location /INSTANCE/aircraft_sil/ {
|
|
|
|
|
alias /usr/local/share/tar1090/aircraft_sil/;
|
|
|
|
|
add_header Cache-Control "public, max-age=1209600";
|
|
|
|
|
try_files $uri /aircraft_sil/ZZZZ.png;
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-22 20:49:11 +01:00
|
|
|
location /INSTANCE {
|
2020-01-03 21:16:40 +01:00
|
|
|
alias HTMLPATH/;
|
|
|
|
|
try_files $uri $uri/ =404;
|
2020-01-22 20:49:11 +01:00
|
|
|
|
2020-01-31 02:47:01 +01:00
|
|
|
gzip_static on;
|
|
|
|
|
|
2020-10-22 19:56:09 +02:00
|
|
|
location ~ db-.*\.js$ {
|
|
|
|
|
gzip off;
|
2020-11-13 20:12:07 +01:00
|
|
|
add_header Cache-Control "public, max-age=7776000";
|
2020-10-22 19:56:09 +02:00
|
|
|
add_header Content-Encoding "gzip";
|
2020-01-03 21:16:40 +01:00
|
|
|
}
|
2020-10-24 09:44:16 +02:00
|
|
|
location /INSTANCE/images {
|
2020-11-13 20:12:07 +01:00
|
|
|
add_header Cache-Control "public, max-age=7776000";
|
2020-10-24 09:44:16 +02:00
|
|
|
}
|
|
|
|
|
location /INSTANCE/flags-tiny {
|
2020-11-13 20:12:07 +01:00
|
|
|
add_header Cache-Control "public, max-age=7776000";
|
2020-01-03 21:16:40 +01:00
|
|
|
}
|
|
|
|
|
location ~ .*\.gif$ {
|
2020-11-13 20:12:07 +01:00
|
|
|
add_header Cache-Control "public, max-age=7776000";
|
2020-01-03 21:16:40 +01:00
|
|
|
}
|
2020-02-24 02:10:54 +01:00
|
|
|
location ~ index.html$ {
|
|
|
|
|
add_header Cache-Control "public, max-age=300";
|
|
|
|
|
}
|
2020-01-03 21:16:40 +01:00
|
|
|
location ~ config.js$ {
|
2020-01-19 12:38:39 +01:00
|
|
|
add_header Cache-Control "public, max-age=10";
|
2020-01-03 21:16:40 +01:00
|
|
|
}
|
|
|
|
|
location ~ .*\.js$ {
|
2020-11-13 20:12:07 +01:00
|
|
|
add_header Cache-Control "public, max-age=7776000";
|
2020-01-03 21:16:40 +01:00
|
|
|
}
|
|
|
|
|
location ~ .*\.css$ {
|
2020-11-13 20:12:07 +01:00
|
|
|
add_header Cache-Control "public, max-age=7776000";
|
2020-01-03 21:16:40 +01:00
|
|
|
}
|
|
|
|
|
}
|