Skip to content

Instantly share code, notes, and snippets.

@khera
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save khera/34c7dce4933676d275e4 to your computer and use it in GitHub Desktop.
Save khera/34c7dce4933676d275e4 to your computer and use it in GitHub Desktop.
lighttpd configuration for poudriere (development version as of today)
$HTTP["host"] == "pkg.kcilink.com" {
server.document-root = "/usr/local/share/poudriere/html"
alias.url = ( "/data" => "/usr/local/poudriere/data/logs/bulk",
"/packages" => "/usr/local/poudriere/data/packages"
)
# Allow caching dynamic files but ensure they get rechecked
$HTTP["url"] =~ "\.(log|txz|tbz|bz2|gz|json)$" {
setenv.add-response-header += ("Cache-Control" => "public, must-revalidate, proxy-revalidate")
}
$HTTP["url"] =~ "\.(jpg|jpeg|gif|png|ico|svg|woff|css|js|html)$" {
setenv.add-response-header += ("Cache-Control" => "public")
expire.url = ( "" => "access plus 2 days" )
}
$HTTP["url"] =~ "^/data/" {
dir-listing.activate = "enable"
}
}
Add to mimetype variable:
".svg" => "image/svg+xml",
".log" => "text/plain",
".json" => "application/json",
@khera
Copy link
Author

khera commented Jun 6, 2014

also be sure to enable the expire and setenv modules.

also add mime types ".json" => "application/json" and ".log" => "text/plain" and ".svg" => "image/svg+xml"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment