133 lines
3.2 KiB
Nginx Configuration File
133 lines
3.2 KiB
Nginx Configuration File
# nginx configuration for tar1090
|
|
location /INSTANCE/data/ {
|
|
alias SOURCE_DIR/;
|
|
gzip_static off;
|
|
location ~ aircraft\.json$ {
|
|
add_header Cache-Control "public, no-cache";
|
|
gzip_static on;
|
|
}
|
|
location /INSTANCE/data/traces/ {
|
|
location ~ trace_recent {
|
|
gzip off;
|
|
add_header Cache-Control "public, no-cache";
|
|
add_header Content-Encoding "gzip";
|
|
}
|
|
location ~ trace_full {
|
|
gzip off;
|
|
add_header Cache-Control "public, no-cache";
|
|
add_header Content-Encoding "gzip";
|
|
}
|
|
}
|
|
location ~ globe_.*\.json$ {
|
|
gzip off;
|
|
add_header Cache-Control "public, no-cache";
|
|
add_header Content-Encoding "gzip";
|
|
}
|
|
location ~ .*\.binCraft$ {
|
|
gzip off;
|
|
add_header Cache-Control "public, no-cache";
|
|
add_header Content-Encoding "gzip";
|
|
}
|
|
}
|
|
|
|
location /INSTANCE/globe_history/ {
|
|
alias /var/globe_history/;
|
|
gzip on;
|
|
gzip_static off;
|
|
|
|
location ~ /acas/ {
|
|
default_type text/plain;
|
|
add_header Cache-Control "public, no-cache";
|
|
|
|
gzip_static on;
|
|
#gunzip 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";
|
|
}
|
|
}
|
|
|
|
location /INSTANCE/chunks/ {
|
|
alias /run/SERVICE/;
|
|
gzip_static off;
|
|
location ~ chunk_.*\.gz$ {
|
|
gzip off;
|
|
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;
|
|
add_header Cache-Control "public, no-cache";
|
|
}
|
|
}
|
|
|
|
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;
|
|
|
|
location ~ ^/INSTANCE/db-.*\.js$ {
|
|
gzip off;
|
|
gzip_static off;
|
|
add_header Cache-Control "public, max-age=7776000";
|
|
add_header Content-Encoding "gzip";
|
|
}
|
|
location /INSTANCE/images {
|
|
add_header Cache-Control "public, max-age=7776000";
|
|
}
|
|
location /INSTANCE/flags-tiny {
|
|
add_header Cache-Control "public, max-age=7776000";
|
|
}
|
|
location /INSTANCE/index.html {
|
|
add_header Cache-Control "public, max-age=0";
|
|
gzip on;
|
|
gzip_static on;
|
|
}
|
|
location /INSTANCE/config.js {
|
|
add_header Cache-Control "public, max-age=0";
|
|
gzip on;
|
|
gzip_static on;
|
|
}
|
|
location ~ ^/INSTANCE/libs/.*$ {
|
|
add_header Cache-Control "public, max-age=7776000";
|
|
gzip on;
|
|
gzip_static on;
|
|
}
|
|
location ~ ^/INSTANCE/[^/]*\.js$ {
|
|
add_header Cache-Control "public, max-age=7776000";
|
|
gzip on;
|
|
gzip_static on;
|
|
}
|
|
location ~ ^/INSTANCE/style.css$ {
|
|
add_header Cache-Control "public, max-age=7776000";
|
|
gzip on;
|
|
gzip_static on;
|
|
}
|
|
}
|