2020-01-03 21:16:40 +01:00
|
|
|
# nginx configuration for tar1090
|
|
|
|
|
location /INSTANCE/data/ {
|
|
|
|
|
alias SOURCE_DIR/;
|
2021-06-15 08:19:20 +02:00
|
|
|
gzip_static off;
|
2020-01-03 21:16:40 +01:00
|
|
|
location ~ aircraft\.json$ {
|
2021-12-01 01:45:39 +01:00
|
|
|
add_header Cache-Control "public, no-cache";
|
2022-07-06 08:58:49 +02:00
|
|
|
gzip on;
|
2021-06-15 08:19:20 +02:00
|
|
|
gzip_static on;
|
2020-01-03 21:16:40 +01:00
|
|
|
}
|
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-12-01 01:45:39 +01:00
|
|
|
add_header Cache-Control "public, no-cache";
|
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-12-01 01:45:39 +01:00
|
|
|
add_header Cache-Control "public, no-cache";
|
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;
|
2021-12-01 01:45:39 +01:00
|
|
|
add_header Cache-Control "public, no-cache";
|
2020-01-31 02:47:01 +01:00
|
|
|
add_header Content-Encoding "gzip";
|
2020-01-03 21:16:40 +01:00
|
|
|
}
|
2021-07-01 13:43:36 +02:00
|
|
|
location ~ .*\.binCraft$ {
|
2020-09-29 00:11:18 +02:00
|
|
|
gzip off;
|
2021-12-01 01:45:39 +01:00
|
|
|
add_header Cache-Control "public, no-cache";
|
2020-09-29 00:11:18 +02:00
|
|
|
add_header Content-Encoding "gzip";
|
|
|
|
|
}
|
2022-07-08 08:21:47 +02:00
|
|
|
location ~ .*\.zst$ {
|
|
|
|
|
gzip off;
|
|
|
|
|
add_header Cache-Control "public, no-cache";
|
|
|
|
|
}
|
2020-01-03 21:16:40 +01:00
|
|
|
}
|
|
|
|
|
|
2022-04-16 06:39:18 +02:00
|
|
|
location /INSTANCE/osm_tiles_offline/ {
|
|
|
|
|
alias /usr/local/share/osm_tiles_offline/;
|
|
|
|
|
}
|
|
|
|
|
|
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;
|
2021-06-15 08:19:20 +02:00
|
|
|
gzip_static off;
|
2021-03-24 11:39:54 +01:00
|
|
|
|
|
|
|
|
location ~ /acas/ {
|
|
|
|
|
default_type text/plain;
|
2021-12-01 01:45:39 +01:00
|
|
|
add_header Cache-Control "public, no-cache";
|
2021-03-24 11:39:54 +01:00
|
|
|
|
|
|
|
|
gzip_static on;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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/;
|
2021-06-15 08:19:20 +02:00
|
|
|
gzip_static off;
|
2020-01-03 21:16:40 +01:00
|
|
|
location ~ chunk_.*\.gz$ {
|
2021-06-15 08:19:20 +02:00
|
|
|
gzip off;
|
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$ {
|
2021-06-15 08:19:20 +02:00
|
|
|
gzip off;
|
2024-05-15 21:41:42 +02:00
|
|
|
add_header Cache-Control "no-cache";
|
2020-01-03 21:16:40 +01:00
|
|
|
add_header Content-Type "application/json";
|
|
|
|
|
add_header Content-Encoding "gzip";
|
|
|
|
|
}
|
|
|
|
|
location ~ .*\.json$ {
|
2021-06-15 08:19:20 +02:00
|
|
|
gzip on;
|
2021-12-01 01:45:39 +01:00
|
|
|
add_header Cache-Control "public, no-cache";
|
2020-01-03 21:16:40 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
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;
|
2021-06-15 08:19:20 +02:00
|
|
|
gzip off;
|
|
|
|
|
gzip_static off;
|
2020-01-31 02:47:01 +01:00
|
|
|
|
2022-02-10 09:40:49 +01:00
|
|
|
# location block priority:
|
|
|
|
|
# = / exact location matches > regex matches > prefix matchs
|
|
|
|
|
|
|
|
|
|
# exact matches
|
|
|
|
|
location = /INSTANCE/config.js {
|
2022-07-08 08:21:47 +02:00
|
|
|
add_header Cache-Control "public, no-cache";
|
2022-01-24 11:29:37 +01:00
|
|
|
gzip on;
|
|
|
|
|
gzip_static on;
|
2020-01-03 21:16:40 +01:00
|
|
|
}
|
2022-02-10 09:40:49 +01:00
|
|
|
location = /INSTANCE/index.html {
|
2022-07-08 08:21:47 +02:00
|
|
|
add_header Cache-Control "public, no-cache";
|
2021-06-15 08:19:20 +02:00
|
|
|
gzip on;
|
|
|
|
|
gzip_static on;
|
2020-02-24 02:10:54 +01:00
|
|
|
}
|
2022-07-25 11:02:57 +02:00
|
|
|
|
|
|
|
|
# regex matches
|
|
|
|
|
location ~ ^/INSTANCE/style.*\.css$ {
|
2022-01-24 11:29:37 +01:00
|
|
|
add_header Cache-Control "public, max-age=7776000";
|
2021-06-15 08:19:20 +02:00
|
|
|
gzip on;
|
|
|
|
|
gzip_static on;
|
2020-01-03 21:16:40 +01:00
|
|
|
}
|
2022-02-10 09:40:49 +01:00
|
|
|
|
|
|
|
|
location ~ ^/INSTANCE/db-.*\.js$ {
|
|
|
|
|
gzip off;
|
|
|
|
|
gzip_static off;
|
|
|
|
|
add_header Cache-Control "public, max-age=7776000";
|
|
|
|
|
add_header Content-Encoding "gzip";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location ~ ^/INSTANCE/libs/.*$ {
|
2020-11-13 20:12:07 +01:00
|
|
|
add_header Cache-Control "public, max-age=7776000";
|
2021-06-15 08:19:20 +02:00
|
|
|
gzip on;
|
|
|
|
|
gzip_static on;
|
2020-01-03 21:16:40 +01:00
|
|
|
}
|
2022-02-10 09:40:49 +01:00
|
|
|
location ~ ^/INSTANCE/[^/]*\.js$ {
|
2020-11-13 20:12:07 +01:00
|
|
|
add_header Cache-Control "public, max-age=7776000";
|
2021-06-15 08:19:20 +02:00
|
|
|
gzip on;
|
|
|
|
|
gzip_static on;
|
2020-01-03 21:16:40 +01:00
|
|
|
}
|
2022-02-10 09:40:49 +01:00
|
|
|
|
|
|
|
|
# prefix matches
|
|
|
|
|
location /INSTANCE/images {
|
|
|
|
|
add_header Cache-Control "public, max-age=7776000";
|
|
|
|
|
}
|
2023-11-28 11:47:20 -05:00
|
|
|
location /INSTANCE/flags {
|
2022-02-10 09:40:49 +01:00
|
|
|
add_header Cache-Control "public, max-age=7776000";
|
|
|
|
|
}
|
2020-01-03 21:16:40 +01:00
|
|
|
}
|