# This is a minimal example config
# See /usr/share/doc/lighttpd
# and http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions

server.port		= 80
server.username		= "http"
server.groupname	= "http"
server.errorlog		= "/var/log/lighttpd/error.log"
dir-listing.activate	= "enable"
mimetype.assign		= (
				".html" => "text/html",
				".txt" => "text/plain",
				".css" => "text/css",
				".js" => "application/x-javascript",
				".jpg" => "image/jpeg",
				".jpeg" => "image/jpeg",
				".gif" => "image/gif",
				".png" => "image/png",
				"" => "application/octet-stream"
			)

# 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.

server.document-root    = "/usr/share/dump1090/html"
index-file.names        = ( "index.html" )

url.redirect += (
  "^/dump1090/$" => "/dump1090/index.html",
  "^/dump1090$" => "/dump1090/index.html"
)

alias.url += (
  "/dump1090/data/" => "/run/dump1090/",
  "/dump1090/" => "/usr/share/dump1090/html/"
)

# The stat cache must be disabled, as aircraft.json changes
# frequently and lighttpd's stat cache often ends up with the
# wrong content length.
server.stat-cache-engine    = "disable"
server.modules += ("mod_alias", "mod_redirect")
