diff --git a/95-tar1090-otherport.conf b/95-tar1090-otherport.conf deleted file mode 100644 index e77e0a1..0000000 --- a/95-tar1090-otherport.conf +++ /dev/null @@ -1,104 +0,0 @@ -# serve tar1090 directly on port 8504 -$SERVER["socket"] == ":8504" { -# redirect the slash-less URL -url.redirect += ( - "^/INSTANCE$" => "/INSTANCE/" -) - -alias.url += ( - "/INSTANCE/data/" => "SOURCE_DIR/", - "/INSTANCE/chunks/" => "/run/SERVICE/", - "/INSTANCE/globe_history/" => "/var/globe_history/", - "/INSTANCE/" => "HTMLPATH/" -) - -$HTTP["url"] =~ "^/INSTANCE/chunks/chunk_.*gz$" { - setenv.add-response-header += ( - "Access-Control-Allow-Origin" => "*", - "Cache-Control" => "public, max-age=1209600", - "Content-Encoding" => "gzip", - "Content-Type" => "application/json", - ) -} -$HTTP["url"] =~ "^/INSTANCE/chunks/current_.*gz$" { - setenv.add-response-header += ( - "Access-Control-Allow-Origin" => "*", - "Cache-Control" => "public, max-age=0", - "Content-Encoding" => "gzip", - "Content-Type" => "application/json", - ) -} -$HTTP["url"] =~ "^/INSTANCE/chunks/978\.json$" { - setenv.add-response-header += ( - "Cache-Control" => "public, max-age=0", - ) -} -$HTTP["url"] =~ "^/INSTANCE/data/aircraft\.json$" { - setenv.add-response-header += ( - "Cache-Control" => "public, max-age=0", - ) -} -$HTTP["url"] =~ "^/INSTANCE/data/globe.*" { - compress.filetype = () - setenv.add-response-header += ( - "Cache-Control" => "public, max-age=0", - "Content-Encoding" => "gzip", - ) -} -$HTTP["url"] =~ "^/INSTANCE/data/traces/" { - compress.filetype = () - setenv.add-response-header += ( - "Cache-Control" => "public, max-age=10", - "Content-Encoding" => "gzip", - ) -} -$HTTP["url"] =~ "^/INSTANCE/globe_history/" { - compress.filetype = () - setenv.add-response-header += ( - "Cache-Control" => "public, max-age=3600", - "Content-Encoding" => "gzip", - ) -} -$HTTP["url"] =~ "^/INSTANCE/images" { - setenv.add-response-header += ( - "Cache-Control" => "public, max-age=1209600", - ) -} -$HTTP["url"] =~ "^/INSTANCE/flags-tiny" { - setenv.add-response-header += ( - "Cache-Control" => "public, max-age=1209600", - ) -} -$HTTP["url"] =~ "^/INSTANCE/config.js$" { - setenv.add-response-header += ( - "Cache-Control" => "public, must-revalidate", - ) -} -$HTTP["url"] =~ "^/INSTANCE/(?!config)[^/]*\.js$" { - setenv.add-response-header += ( - "Cache-Control" => "public, max-age=1209600", - ) -} -$HTTP["url"] =~ "^/INSTANCE/db-.*\.js$" { - compress.filetype = () - setenv.add-response-header += ( - "Cache-Control" => "public, max-age=1209600", - "Content-Encoding" => "gzip", - ) -} -$HTTP["url"] =~ "^/INSTANCE/ol/.*$" { - setenv.add-response-header += ( - "Cache-Control" => "public, max-age=1209600", - ) -} -$HTTP["url"] =~ "^/INSTANCE/jquery/.*$" { - setenv.add-response-header += ( - "Cache-Control" => "public, max-age=1209600", - ) -} -$HTTP["url"] =~ "^/INSTANCE/.*\.css$" { - setenv.add-response-header += ( - "Cache-Control" => "public, max-age=1209600", - ) -} -} diff --git a/install.sh b/install.sh index ebfd901..62cbe99 100755 --- a/install.sh +++ b/install.sh @@ -155,6 +155,13 @@ cp install.sh uninstall.sh LICENSE README.md $ipath cp default $ipath/example_config_dont_edit rm -f $ipath/default +# create 95-tar1090-otherport.conf +{ + echo '# serve tar1090 directly on port 8504' + echo '$SERVER["socket"] == ":8504" {' + cat 88-tar1090.conf + echo '}' +} > 95-tar1090-otherport.conf services="" names=""