1 # lighttpd configuration file
3 # use a it as base for lighttpd 1.4 and above
7 ############ Options you really have to take care of ####################
10 # at least mod_access and mod_accesslog should be loaded
11 # all other module should only be loaded if really neccesary
21 # "mod_trigger_b4_dl",
41 ## a static document-root, for virtual-hosting take look at the
42 ## server.virtual-* options
43 server.document-root = "/home/services/lighttpd/html/"
45 ## where to send error-messages to
46 server.errorlog = "/var/log/lighttpd/lighttpd.log"
48 # files to check for if .../ is requested
56 ## set the event-handler (read the performance section in the manual)
57 # Linux 2.4+ rt-signals linux-rtsig
58 # Linux 2.6+ epoll linux-sysepoll
59 #server.event-handler = "linux-sysepoll"
62 # include, relative to dirname of main config file
63 include "mime.types.conf"
65 # Use the "Content-Type" extended attribute to obtain mime type if possible
66 #mimetype.use-xattr = "enable"
68 ## send a different Server: header
69 ## be nice and keep it at lighttpd
70 #server.tag = "lighttpd"
73 accesslog.filename = "/var/log/lighttpd/access.log"
75 ## deny access the file-extensions
77 # ~ is for backupfiles from vi, emacs, joe, ...
78 # .inc is often used for code includes which should in general not be part
79 # of the document-root
80 url.access-deny = ( "~", ".inc" )
82 $HTTP["url"] =~ "\.pdf$" {
83 server.range-requests = "disable"
87 # which extensions should not be handle via static-file transfer
89 # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
90 static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
92 ######### Options that are good to be but not neccesary to be changed #######
94 ## bind to port (default: 80)
97 ## bind to localhost (default: all interfaces)
98 #server.bind = "grisu.home.kneschke.de"
100 ## error-handler for status 404
101 #server.error-handler-404 = "/error-handler.html"
102 #server.error-handler-404 = "/error-handler.php"
104 ## to help the rc.scripts
105 #server.pid-file = "/var/run/lighttpd.pid"
109 ## If you want name-based virtual hosting add the next three settings and load
113 ## virtual-server-root + virtual-server-default-host + virtual-server-docroot
115 ## virtual-server-root + http-host + virtual-server-docroot
117 #simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
118 #simple-vhost.default-host = "grisu.home.kneschke.de"
119 #simple-vhost.document-root = "/pages/"
123 ## Format: <errorfile-prefix><status-code>.html
124 ## -> ..../status-404.html for 'File not found'
125 #server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"
127 ## virtual directory listings
128 #server.dir-listing = "enable"
131 #debug.log-request-header = "enable"
132 #debug.log-response-header = "enable"
133 #debug.log-request-handling = "enable"
134 #debug.log-file-not-found = "enable"
136 ### only root can use these options
138 # chroot() to directory (default: no chroot() )
141 ## change uid to <uid> (default: don't care)
142 server.username = "lighttpd"
144 ## change uid to <uid> (default: don't care)
145 server.groupname = "lighttpd"
148 #compress.cache-dir = "/tmp/lighttpd/cache/compress/"
149 #compress.filetype = ("text/plain", "text/html")
152 ## read proxy.txt for more info
156 # "host" => "192.168.0.101",
163 ## read fastcgi.txt for more info
168 # "socket" => "/var/run/php/php-fastcgi.sock",
169 # "bin-path" => "/usr/bin/php.fcgi",
177 # ".pl" => "/usr/bin/perl",
178 # ".cgi" => "/usr/bin/perl",
182 #ssl.engine = "enable"
183 #ssl.pemfile = "server.pem"
186 #status.status-url = "/server-status"
187 #status.config-url = "/server-config"
190 ## read authentication.txt for more info
192 # 0 for off, 1 for 'auth-ok' messages, 2 for verbose debugging
195 # plain, htpasswd, ldap or htdigest
196 #auth.backend = "plain"
197 # filename of the password storage
199 #auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user"
200 #auth.backend.plain.groupfile = "/etc/lighttpd/lighttpd.group"
202 #auth.backend.htpasswd.userfile = "/etc/lighttpd/lighttpd-htpasswd.user"
204 #auth.backend.htdigest.userfile = "/etc/lighttpd/lighttpd-htdigest.user"
206 # the $ in auth.backend.ldap.filter is replaced by the
207 # 'username' from the login dialog
208 #auth.backend.ldap.hostname = "localhost"
209 #auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
210 #auth.backend.ldap.filter = "(uid=$)"
213 # "/server-status" => (
214 # "method" => "digest",
215 # "realm" => "download archiv",
216 # "require" => "user=jan"
218 # "/server-info" => (
219 # "method" => "digest",
220 # "realm" => "download archiv",
221 # "require" => "valid-user"
225 #### url handling modules (rewrite, redirect, access)
227 # "^/$" => "/server-status",
230 # "^/wishlist/(.+)" => "http://www.123.org/$1",
232 #### both rewrite/redirect support back reference to regex conditional using %n
233 #$HTTP["host"] =~ "^www\.(.*)" {
234 # url.redirect = ( "^/(.*)" => "http://%1/$1" )
237 # define a pattern for the host url finding
239 # %0 => domain name + tld
241 # %2 => domain name without tld
242 # %3 => subdomain 1 name
243 # %4 => subdomain 2 name
245 #evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
249 # "/buggy/" => "access 2 hours",
250 # "/asdhas/" => "access plus 1 seconds 2 minutes",
254 #ssi.extension = ( ".shtml" )
257 #rrdtool.binary = "/usr/bin/rrdtool"
258 #rrdtool.db-name = "/var/www/lighttpd.rrd"
261 #setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
262 #setenv.add-response-header = ( "X-Secret-Message" => "42" )
264 ## for mod_trigger_b4_dl
265 # trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
266 # trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
267 # trigger-before-download.trigger-url = "^/trigger/"
268 # trigger-before-download.download-url = "^/download/"
269 # trigger-before-download.deny-url = "http://127.0.0.1/index.html"
270 # trigger-before-download.trigger-timeout = 10
273 ## don't forget to add index.cml to server.indexfiles
274 # cml.extension = ".cml"
275 # cml.memcache-hosts = ( "127.0.0.1:11211" )
278 ## variable name without "." is auto prefixed by "var." and becomes "var.bar"
280 #var.mystring = "foo"
284 ## string concat, with integer cast as string, result: "www.foo1.com"
285 #server.name = "www." + mystring + var.bar + ".com"
287 #index-file.names = (foo + ".php") + index-file.names
288 #index-file.names += (foo + ".php")
291 #include /etc/lighttpd/lighttpd-inc.conf
292 ## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
293 #include "lighttpd-inc.conf"
296 #include_shell "echo var.a=1"
297 ## the above is same as:
301 #userdir.path = "public_html"
302 #userdir.exclude-user = ( "root", "postmaster" )
304 ## if set, only users from this list may use the feature
305 #userdir.include-user = ""
309 # "/cgi-bin/" => "/usr/lib/cgi-bin",