lighttpd: Serve diff files as plain text.
[matthijs/servers/drsnuggles.git] / etc / lighttpd / lighttpd.conf
1 # Debian lighttpd configuration file
2 #
3
4 # Chroot into our root-dir
5 #server.chroot            = "/data/www"
6
7 #var.root-dir             = ""
8 var.root-dir             = "/data/www"
9 var.conf-dir             = "/etc/lighttpd"
10 var.fcgi-dir             = var.root-dir + "/var/fcgi"
11
12 ## modules to load
13 server.modules              = (
14             "mod_auth",
15             "mod_access",
16             "mod_alias",
17             "mod_accesslog",
18             "mod_rewrite",
19             "mod_redirect",
20             "mod_evhost",
21             "mod_cgi",
22             "mod_fastcgi",
23             "mod_setenv",
24 )
25
26 # Set a default catch-all document root, which should never be used.
27 server.document-root       = var.root-dir + "/default/htdocs"
28
29 ## where to upload files to, purged daily.
30 server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
31
32 ## where to send error-messages to
33 server.errorlog            = var.root-dir + "/default/logs/error.log"
34
35 ## files to check for if .../ is requested
36 index-file.names           = ( "index.php", "index.html" )
37
38 #### accesslog module
39 accesslog.filename         = var.root-dir + "/default/logs/access.log"
40
41 ## deny access the file-extensions
42 #
43 # ~    is for backupfiles from vi, emacs, joe, ...
44 # .inc is often used for code includes which should in general not be part
45 #      of the document-root
46 url.access-deny            = ( "~", ".inc" )
47
48 ##
49 # which extensions should not be handle via static-file transfer
50 #
51 # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
52 static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
53
54 ## Use ipv6 only if available.
55 server.use-ipv6 = "disable"
56
57 ## to help the rc.scripts
58 server.pid-file            = "/var/run/lighttpd.pid"
59
60 ## virtual directory listings
61 dir-listing.encoding        = "utf-8"
62 # Disable dir-listing by default
63 server.dir-listing          = "disable"
64
65 # Don't run as root
66 server.username            = "www-data"
67 server.groupname           = "www-data"
68
69 # Make mysqll frontend available in all domains
70 alias.url                  += ("/mysql" => "/usr/share/phpmyadmin")
71
72 $SERVER["socket"] == ":443" {
73         ssl.engine = "enable" 
74         # The CA certificates (in particular, this contains the intermediate
75         # certificate used by startcom). It seems that even without this
76         # option, it already works, probably because openssl ships some
77         # certificates. But, let's put it here to be safe anyway.
78         ssl.ca-file = "/etc/lighttpd/ssl/ca/startssl-all-ca.pem"
79         # Use the mail.stdin.nl certificate as the default certificate (for
80         # non-SNI browsers and domains without their own certificate), since
81         # it is currently the only one we have anyway.
82         ssl.pemfile = "/etc/lighttpd/ssl/mail.stdin.nl.pem"
83 }
84
85 #### external configuration files
86 ## mimetype mapping
87 include_shell var.conf-dir + "/scripts/create-mime.assign.pl"
88
89 ## load vhosts
90 include_shell var.conf-dir + "/scripts/include-vhosts.pl"