Files
tar1090/nginx.conf

94 lines
2.4 KiB
Nginx Configuration File
Raw Normal View History

# 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
}
}
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";
}
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-19 12:38:39 +01:00
location /INSTANCE/globe_history/ {
alias /var/globe_history/;
2020-02-01 04:29:34 +01:00
gzip off;
add_header Cache-Control "public, max-age=3600";
2020-01-31 04:43:20 +01:00
add_header Content-Encoding "gzip";
2020-01-19 12:38:39 +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";
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;
}
location /INSTANCE {
alias HTMLPATH/;
try_files $uri $uri/ =404;
2020-01-31 02:47:01 +01:00
gzip_static on;
location ~ db-.*\.js$ {
gzip off;
2020-11-13 20:12:07 +01:00
add_header Cache-Control "public, max-age=7776000";
add_header Content-Encoding "gzip";
}
location /INSTANCE/images {
2020-11-13 20:12:07 +01:00
add_header Cache-Control "public, max-age=7776000";
}
location /INSTANCE/flags-tiny {
2020-11-13 20:12:07 +01:00
add_header Cache-Control "public, max-age=7776000";
}
location ~ .*\.gif$ {
2020-11-13 20:12:07 +01:00
add_header Cache-Control "public, max-age=7776000";
}
2020-02-24 02:10:54 +01:00
location ~ index.html$ {
add_header Cache-Control "public, max-age=300";
}
location ~ config.js$ {
2020-01-19 12:38:39 +01:00
add_header Cache-Control "public, max-age=10";
}
location ~ .*\.js$ {
2020-11-13 20:12:07 +01:00
add_header Cache-Control "public, max-age=7776000";
}
location ~ .*\.css$ {
2020-11-13 20:12:07 +01:00
add_header Cache-Control "public, max-age=7776000";
}
}