44
34
## Use the "Content-Type" extended attribute to obtain mime type if possible
45
35
# mimetype.use-xattr = "enable"
48
accesslog.filename = "/var/log/lighttpd/access.log"
50
## deny access the file-extensions
52
# ~ is for backupfiles from vi, emacs, joe, ...
53
# .inc is often used for code includes which should in general not be part
54
# of the document-root
55
url.access-deny = ( "~", ".inc" )
58
38
# which extensions should not be handle via static-file transfer
88
68
dir-listing.encoding = "utf-8"
89
69
server.dir-listing = "enable"
91
## send unhandled HTTP-header headers to error-log
92
#debug.dump-unknown-headers = "enable"
94
71
### only root can use these options
96
73
# chroot() to directory (default: no chroot() )
97
74
#server.chroot = "/"
99
## change uid to <uid> (default: don't care)
76
## change uid to <uid> (default: don't change)
100
77
server.username = "www-data"
102
## change uid to <uid> (default: don't care)
79
## change gid to <gid> (default: don't change)
103
80
server.groupname = "www-data"
105
82
#### compress module
106
83
compress.cache-dir = "/var/cache/lighttpd/compress/"
107
84
compress.filetype = ("text/plain", "text/html", "application/x-javascript", "text/css")
110
86
#### url handling modules (rewrite, redirect, access)
111
87
# url.rewrite = ( "^/$" => "/server-status" )
112
88
# url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
115
# define a pattern for the host url finding
117
# %0 => domain name + tld
119
# %2 => domain name without tld
120
# %3 => subdomain 1 name
121
# %4 => subdomain 2 name
123
# evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
125
90
#### expire module
126
91
# expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
129
# rrdtool.binary = "/usr/bin/rrdtool"
130
# rrdtool.db-name = "/var/www/lighttpd.rrd"
133
## variable name without "." is auto prefixed by "var." and becomes "var.bar"
135
#var.mystring = "foo"
139
## string concat, with integer cast as string, result: "www.foo1.com"
140
#server.name = "www." + mystring + var.bar + ".com"
142
#index-file.names = (foo + ".php") + index-file.names
143
#index-file.names += (foo + ".php")
146
93
#### external configuration files
147
94
## mimetype mapping
148
95
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
150
97
## load enabled configuration files,
151
98
## read /etc/lighttpd/conf-available/README first
152
99
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
154
#### handle Debian Policy Manual, Section 11.5. urls
155
## by default allow them only from localhost
156
## (This must come last due to #445459)
157
## Note: =~ "127.0.0.1" works with ipv6 enabled, whereas == "127.0.0.1" doesn't
158
$HTTP["remoteip"] =~ "127.0.0.1" {
160
"/doc/" => "/usr/share/doc/",
161
"/images/" => "/usr/share/images/"
163
$HTTP["url"] =~ "^/doc/|^/images/" {
164
dir-listing.activate = "enable"