Files
tar1090/nginx.conf

142 lines
3.3 KiB
Nginx Configuration File
Raw Normal View History

# nginx configuration for tar1090
location /INSTANCE/data/ {
alias SOURCE_DIR/;
gzip_static off;
location ~ aircraft\.json$ {
2021-12-01 01:45:39 +01:00
add_header Cache-Control "public, no-cache";
gzip_static on;
}
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
}
}
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";
}
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";
}
}
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;
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;
#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
}
location /INSTANCE/chunks/ {
alias /run/SERVICE/;
gzip_static off;
location ~ chunk_.*\.gz$ {
gzip off;
2020-11-13 20:12:07 +01:00
add_header Cache-Control "public, max-age=86400";
add_header Content-Type "application/json";
add_header Content-Encoding "gzip";
}
location ~ current_.*\.gz$ {
gzip off;
add_header Cache-Control "must-revalidate";
add_header Content-Type "application/json";
add_header Content-Encoding "gzip";
}
location ~ .*\.json$ {
gzip on;
2021-12-01 01:45:39 +01:00
add_header Cache-Control "public, no-cache";
}
}
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;
}
location /INSTANCE {
alias HTMLPATH/;
try_files $uri $uri/ =404;
gzip off;
gzip_static off;
2020-01-31 02:47:01 +01:00
# location block priority:
# = / exact location matches > regex matches > prefix matchs
# exact matches
location = /INSTANCE/config.js {
2022-01-24 11:29:37 +01:00
add_header Cache-Control "public, max-age=0";
gzip on;
gzip_static on;
}
location = /INSTANCE/index.html {
2022-01-24 11:29:37 +01:00
add_header Cache-Control "public, max-age=0";
gzip on;
gzip_static on;
2020-02-24 02:10:54 +01:00
}
location = /INSTANCE/style.css {
2022-01-24 11:29:37 +01:00
add_header Cache-Control "public, max-age=7776000";
gzip on;
gzip_static on;
}
# regex matches
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";
gzip on;
gzip_static on;
}
location ~ ^/INSTANCE/[^/]*\.js$ {
2020-11-13 20:12:07 +01:00
add_header Cache-Control "public, max-age=7776000";
gzip on;
gzip_static on;
}
# prefix matches
location /INSTANCE/images {
add_header Cache-Control "public, max-age=7776000";
}
location /INSTANCE/flags-tiny {
add_header Cache-Control "public, max-age=7776000";
}
}