summaryrefslogtreecommitdiff
path: root/lighttpd.conf
blob: 445c0e2bbf15a9b120ff8180e813b7b6bf698d75 (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
35
36
37
38
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_expire", "mod_compress", "mod_setenv" )

expire.url = ("/dump/" => "access plus 1 years",
              "/css/font/" => "access plus 7 days",
              "/js/lib/" => "access plus 1 days",
              "/scripts/" => "access plus 1 days",
              "/" => "access plus 5 seconds")
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")