# 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. # Enable alias module # ## This module is normally already enabled in lighttpd, so you should not ## need to uncommment this line. ## There are some cases (e.g. when installing this on a Raspberry Pi ## that runs PiHole) in which the module has been removed from the ## default configuration, and the dump1090-fa web interface no longer ## loads properly. ## If this is what you are experiencing, or if you see messages in your ## error log like: ## (server.c.1493) WARNING: unknown config-key: alias.url (ignored) ## then uncommenting this line and then restarting lighttpd could fix ## the issue. ## This is not enabled by default as standard lighttpd will not start if ## modules are loaded multiple times. # # server.modules += ( "mod_alias" ) 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" => "*" ) }