56 lines
1.5 KiB
Nginx Configuration File
56 lines
1.5 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/ {
|
|
add_header Cache-Control "public, max-age=10";
|
|
add_header Content-Type "application/json";
|
|
add_header Content-Encoding "gzip";
|
|
}
|
|
location ~ globe_.*\.json$ {
|
|
add_header Cache-Control "public, max-age=2";
|
|
}
|
|
}
|
|
|
|
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;
|
|
location ~ db/.*\.json$ {
|
|
add_header Cache-Control "public, max-age=100000";
|
|
}
|
|
location ~ .*\.png$ {
|
|
add_header Cache-Control "public, max-age=1209600";
|
|
}
|
|
location ~ .*\.gif$ {
|
|
add_header Cache-Control "public, max-age=1209600";
|
|
}
|
|
location ~ config.js$ {
|
|
add_header Cache-Control "must-revalidate";
|
|
}
|
|
location ~ .*\.js$ {
|
|
add_header Cache-Control "public, max-age=1209600";
|
|
}
|
|
location ~ .*\.css$ {
|
|
add_header Cache-Control "public, max-age=1209600";
|
|
}
|
|
}
|