summaryrefslogtreecommitdiff
path: root/src/server/lighttpd.conf
blob: 88a016513f79ed7c7a6b1c7189800660fac9738d (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Run with (with -D for no-daemon)
# /usr/sbin/lighttpd -f lighttpd.conf -D
#

server.modules              = (
                                "mod_access",
                                "mod_fastcgi",
                                "mod_accesslog",
                                "mod_redirect",
                                "mod_cgi"
                              )

var.basedir = var.CWD

# John: no longer valid after removing `src/ui` 2018-11-15
server.document-root        = basedir + "/../ui/gwt/www"

server.errorlog             = basedir + "/error.log"

cgi.assign = ( ".cgi" => "" )
cgi.execute-x-only = "enable"

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

## set the event-handler (read the performance section in the manual)
# server.event-handler = "freebsd-kqueue" # needed on OS X # Crashes on osx
#server.event-handler = "poll"
server.event-handler = "select"

# mimetype mapping
mimetype.assign             = (
  ".gif"          =>      "image/gif",
  ".jpg"          =>      "image/jpeg",
  ".jpeg"         =>      "image/jpeg",
  ".png"          =>      "image/png",
  ".css"          =>      "text/css",
  ".html"         =>      "text/html",
  ".htm"          =>      "text/html",
  ".js"           =>      "text/javascript",
  # default mime type
  ""              =>      "application/octet-stream",
 )

accesslog.filename = basedir + "/access.log"

debug.log-request-header   = "disable"
debug.log-response-header  = "disable"
debug.log-request-handling = "disable"

$HTTP["host"] =~ "^(.*)$" {
      url.redirect = ( "^/$" => "http://%1/translate/" )
}

fastcgi.debug = 0
fastcgi.server = (".pgf" =>
                  ((
                    "socket" => basedir + "/" + var.PID + "-pgf.socket",
                    "bin-path" => basedir + "/dist/build/pgf-service/pgf-service",
		    # Use 2 OS threads (to be able to use 2 cores).
		    # Limit heap size to 512 MB.
                    "bin-environment" => ("GHCRTS" => "-N2 -M512M"),
                    "min-procs" => 1,
                    "max-procs" => 1,
                    "broken-scriptfilename" => "disable",
		    "check-local" => "disable"
                   )),
                  ".fcgi" =>
                  ((
                    "socket" => basedir + "/" + var.PID + "-morpho.socket",
#                    "bin-path" => basedir + "/dist/build/morpho-server/morpho-server",
                    "bin-environment" => ("GHCRTS" => "-M512M"),
                    "min-procs" => 1,
                    "max-procs" => 1,
                    "broken-scriptfilename" => "disable",
		    "check-local" => "disable"
                   ))
                 )

## deny access the file-extensions
#
# ~    is for backupfiles from vi, emacs, joe, ...
# .inc is often used for code includes which should in general not be part
#      of the document-root
url.access-deny             = ( "~", ".inc" )

$HTTP["url"] =~ "\.pdf$" {
  server.range-requests = "disable"
}

##
# which extensions should not be handle via static-file transfer
#
# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

######### Options that are good to be but not neccesary to be changed #######

## bind to port (default: 80)
server.port                = 41296