aboutsummaryrefslogtreecommitdiff
path: root/captain/bin/local.conf
blob: 9e3e9f26056311fa8cbb2035e20449df293b298d (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
39
40
41
42
43
44
45
46
47
48
server.bind = "0.0.0.0"
server.port = 8000
server.document-root = var.CWD + "/.."

index-file.names = ( "index.php", "index.html", "index.htm", "default.htm" )

server.modules = ( "mod_cgi", "mod_access", "mod_accesslog", "mod_alias", "mod_setenv" )

setenv.add-environment = ( "LEVITATING_CONFIG_CGI" => env.LEVITATING_CONFIG_CGI )

cgi.assign = ( ".html" => server.document-root + "/levitating-captain" )

$HTTP["url"] =~ "^/cgi-bin" {
    alias.url += ( "/cgi-bin" => server.document-root )
    cgi.assign = ( "" => "" )
}

$HTTP["url"] =~ "^/static" {
    alias.url += ( "/static" => server.document-root + "/example/static" )
}

$HTTP["url"] =~ "^/json" {
    cgi.assign = ( ".json" => server.document-root + "/levitating-captain" )
}

mimetype.assign = (  
  ".css"        =>  "text/css",
  ".gif"        =>  "image/gif",
  ".htm"        =>  "text/html",
  ".html"       =>  "text/html",
  ".jpeg"       =>  "image/jpeg",
  ".jpg"        =>  "image/jpeg",
  ".js"         =>  "text/javascript",
  ".png"        =>  "image/png",
  ".swf"        =>  "application/x-shockwave-flash",
  ".txt"        =>  "text/plain"
)

# Making sure file uploads above 64k always work when using IE or Safari
# For more information, see http://trac.lighttpd.net/trac/ticket/360
$HTTP["useragent"] =~ "^(.*MSIE.*)|(.*AppleWebKit.*)$" {
  server.max-keep-alive-requests = 0
}



server.errorlog   = server.document-root + "/example/log/error.log"
accesslog.filename = server.document-root + "/example/log/access.log"