summaryrefslogtreecommitdiff
path: root/lighttpd-static/lighttpd.conf
blob: 3fe4b4838bac2e712b7a080879368e77fc84b677 (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
# See /usr/share/doc/lighttpd

server.port		= 8080
server.username		= "www-data"
server.groupname	= "www-data"
server.document-root	= "/var/www"
server.errorlog		= "/dev/stdout"
server.modules         += ( "mod_setenv" )
dir-listing.activate	= "enable"
index-file.names	= ( "index.html" )
mimetype.assign		= (
				".html" => "text/html",
				".txt" => "text/plain",
				".log" => "text/plain",
				".json" => "text/plain",
				".css" => "text/css",
				".js" => "application/x-javascript",
				".jpg" => "image/jpeg",
				".jpeg" => "image/jpeg",
				".gif" => "image/gif",
				".png" => "image/png",
				".gz" => "text/plain", 
				"" => "application/octet-stream"
			)

setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*")

$HTTP["url"] =~ "\.gz$" {
   setenv.add-response-header = ( "Content-Encoding" => "x-gzip" )
   compress.filetype = ()
   mimetype.assign = ("" => "text/plain")
}