# Allows access to the static files that provide the dump1090 map view, # and also to the dynamically-generated json parts that contain aircraft # data and are periodically written by the dump1090 daemon. alias.url += ( "/dump1090-fa/data/" => "/run/dump1090-fa/", "/dump1090-fa/" => "/usr/share/dump1090-fa/html/" ) # redirect the slash-less URL url.redirect += ( "^/dump1090-fa$" => "/dump1090-fa/" ) # Listen on port 8080 and serve the map there, too. $SERVER["socket"] == ":8080" { alias.url += ( "/data/" => "/run/dump1090-fa/", "/" => "/usr/share/dump1090-fa/html/" ) } # Add CORS header server.modules += ( "mod_setenv" ) $HTTP["url"] =~ "^/dump1090-fa/data/.*\.json$" { setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" ) } # Uncomment this section to enable SSL traffic (HTTPS) - especially useful # for .dev domains ## Listen on 8443 for SSL connections #server.modules += ( "mod_openssl" ) #$HTTP["host"] == "piaware.example.com" { # $SERVER["socket"] == ":8443" { # ssl.engine = "enable" # ssl.pemfile = "/etc/ssl/certs/combined.pem" # ssl.ca-file = "/etc/ssl/certs/fullchain.cer" # ssl.honor-cipher-order = "enable" # ssl.cipher-list = "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH" # ssl.use-sslv2 = "disable" # ssl.use-sslv3 = "disable" # # alias.url += ( # "/data/" => "/run/dump1090-fa/", # "/" => "/usr/share/dump1090-fa/html/" # ) # } #} # ## Redirect HTTP to HTTPS #$HTTP["scheme"] == "http" { # $HTTP["host"] =~ ".*" { # url.redirect = (".*" => "https://%0$0") # } #}