Files
tar1090/nginx.conf

71 lines
1.9 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 {
add_header Cache-Control "public, max-age=10";
add_header Content-Type "application/json";
add_header Content-Encoding "gzip";
}
location ~ trace_full {
add_header Cache-Control "public, max-age=60";
add_header Content-Type "application/json";
add_header Content-Encoding "gzip";
}
}
location ~ globe_.*\.json$ {
2020-01-07 00:36:09 +01:00
add_header Cache-Control "public, max-age=2";
}
}
2020-01-19 12:38:39 +01:00
location /INSTANCE/globe_history/ {
alias /var/globe_history/;
add_header Cache-Control "public, max-age=600";
add_header Content-Type "application/json";
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;
location ~ db2/.*\.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$ {
2020-01-19 12:38:39 +01:00
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";
}
}