78 lines
1.9 KiB
Nginx Configuration File
78 lines
1.9 KiB
Nginx Configuration File
# nginx configuration for tar1090
|
|
location /INSTANCE/data/ {
|
|
alias SOURCE_DIR/;
|
|
location ~ aircraft\.json$ {
|
|
add_header Cache-Control "public, max-age=0";
|
|
}
|
|
location /INSTANCE/data/traces/ {
|
|
location ~ trace_recent {
|
|
gzip off;
|
|
add_header Cache-Control "public, max-age=5";
|
|
add_header Content-Encoding "gzip";
|
|
}
|
|
location ~ trace_full {
|
|
gzip off;
|
|
add_header Cache-Control "public, max-age=200";
|
|
add_header Content-Encoding "gzip";
|
|
}
|
|
}
|
|
location ~ globe_.*\.json$ {
|
|
gzip off;
|
|
add_header Cache-Control "public, max-age=0";
|
|
add_header Content-Encoding "gzip";
|
|
}
|
|
}
|
|
|
|
location /INSTANCE/globe_history/ {
|
|
alias /var/globe_history/;
|
|
gzip off;
|
|
add_header Cache-Control "public, max-age=3600";
|
|
add_header Content-Encoding "gzip";
|
|
}
|
|
|
|
location /INSTANCE/chunks/ {
|
|
alias /run/SERVICE/;
|
|
location ~ chunk_.*\.gz$ {
|
|
add_header Cache-Control "public, max-age=1209600";
|
|
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";
|
|
}
|
|
}
|
|
|
|
location /INSTANCE {
|
|
alias HTMLPATH/;
|
|
try_files $uri $uri/ =404;
|
|
|
|
gzip_static on;
|
|
|
|
location ~ db.*\.json$ {
|
|
add_header Cache-Control "public, max-age=1209600";
|
|
}
|
|
location ~ .*\.png$ {
|
|
add_header Cache-Control "public, max-age=1209600";
|
|
}
|
|
location ~ .*\.gif$ {
|
|
add_header Cache-Control "public, max-age=1209600";
|
|
}
|
|
location ~ index.html$ {
|
|
add_header Cache-Control "public, max-age=300";
|
|
}
|
|
location ~ config.js$ {
|
|
add_header Cache-Control "public, max-age=10";
|
|
}
|
|
location ~ .*\.js$ {
|
|
add_header Cache-Control "public, max-age=1209600";
|
|
}
|
|
location ~ .*\.css$ {
|
|
add_header Cache-Control "public, max-age=1209600";
|
|
}
|
|
}
|