Last active
August 29, 2015 14:02
-
-
Save khera/34c7dce4933676d275e4 to your computer and use it in GitHub Desktop.
lighttpd configuration for poudriere (development version as of today)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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", |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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"