Files
tar1090/nginx.conf
2019-12-31 17:41:26 +01:00

54 lines
1.4 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 ~ icao_.*\.json$ {
add_header Cache-Control "public, max-age=10";
}
location ~ globe_.*\.json$ {
add_header Cache-Control "public, max-age=0";
}
}
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=1209600";
}
location ~ .*\.png$ {
add_header Cache-Control "public, max-age=2419200";
}
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";
}
}