summaryrefslogtreecommitdiff
path: root/lighttpd.conf
blob: f2df7b70dba03f7f31467feed57602ac375c1be9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
server.document-root = var.CWD + "/www"
server.port = 8080

mimetype.assign = (
  ".css" => "text/css",
  ".html" => "text/html; charset=utf-8",
  ".jpg" => "image/jpeg",
  ".js" => "application/javascript",
  ".json" => "application/json",
# ".mkv" => "video/x-matroska",
  ".mp4" => "video/mp4",
  ".ogg" => "audio/ogg",
  ".png" => "image/png",
  ".svg" => "image/svg+xml",
# ".ttf" => "application/x-font-ttf",
  ".txt" => "text/plain; charset=utf-8",
  ".webm" => "video/webm",
  ".webp" => "image/webp",
  ".woff" => "application/font-woff"
)

index-file.names = ("index.html")

dir-listing.activate = "enable"

server.modules = ( "mod_compress", "mod_expire", "mod_setenv" )

expire.url = ("/dump/" => "access plus 1 years", "/js/lib/" => "access plus 1 days")
setenv.add-response-header += (
    "Cache-Control" => "public"
)

compress.cache-dir = "/tmp/lighttpd-compress"
compress.filetype = ("text/html", "text/plain", "text/css", "application/javascript", "application/json")