Files
tar1090/nginx.conf

88 lines
2.2 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;
2020-04-19 14:50:03 +02:00
add_header Cache-Control "public, max-age=5";
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;
add_header Cache-Control "public, max-age=200";
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$ {
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;
2020-01-31 02:47:01 +01:00
gzip_static on;
location ~ db-.*\.js$ {
gzip off;
2020-02-23 17:07:36 +01:00
add_header Cache-Control "public, max-age=1209600";
add_header Content-Encoding "gzip";
}
location /INSTANCE/images {
add_header Cache-Control "public, max-age=1209600";
}
location /INSTANCE/flags-tiny {
add_header Cache-Control "public, max-age=1209600";
}
location ~ .*\.gif$ {
add_header Cache-Control "public, max-age=1209600";
}
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$ {
add_header Cache-Control "public, max-age=1209600";
}
location ~ .*\.css$ {
add_header Cache-Control "public, max-age=1209600";
}
}