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
36 # "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"
47 server.pid-file = "/var/run/lighttpd.pid"
49 # files to check for if .../ is requested
57 ## set the event-handler (read the performance section in the manual)
58 # Linux 2.4+ rt-signals linux-rtsig
59 # Linux 2.6+ epoll linux-sysepoll
60 #server.event-handler = "linux-sysepoll"
63 # include, relative to dirname of main config file
64 include "mime.types.conf"
66 # Use the "Content-Type" extended attribute to obtain mime type if possible
67 #mimetype.use-xattr = "enable"
69 ## send a different Server: header
70 ## be nice and keep it at lighttpd
71 #server.tag = "lighttpd"
74 accesslog.filename = "/var/log/lighttpd/access.log"
76 ## deny access the file-extensions
78 # ~ is for backupfiles from vi, emacs, joe, ...
79 # .inc is often used for code includes which should in general not be part
80 # of the document-root
81 url.access-deny = ( "~", ".inc" )
83 $HTTP["url"] =~ "\.pdf$" {
84 server.range-requests = "disable"
88 # which extensions should not be handle via static-file transfer
90 # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
91 static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
93 ######### Options that are good to be but not neccesary to be changed #######
95 ## bind to port (default: 80)
98 ## bind to localhost (default: all interfaces)
99 #server.bind = "grisu.home.kneschke.de"
101 ## error-handler for status 404
102 #server.error-handler-404 = "/error-handler.html"
103 #server.error-handler-404 = "/error-handler.php"
107 ## If you want name-based virtual hosting add the next three settings and load
111 ## virtual-server-root + virtual-server-default-host + virtual-server-docroot
113 ## virtual-server-root + http-host + virtual-server-docroot
115 #simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
116 #simple-vhost.default-host = "grisu.home.kneschke.de"
117 #simple-vhost.document-root = "/pages/"
121 ## Format: <errorfile-prefix><status-code>.html
122 ## -> ..../status-404.html for 'File not found'
123 #server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"
125 ## virtual directory listings
126 #server.dir-listing = "enable"
129 #debug.log-request-header = "enable"
130 #debug.log-response-header = "enable"
131 #debug.log-request-handling = "enable"
132 #debug.log-file-not-found = "enable"
134 ### only root can use these options
136 # chroot() to directory (default: no chroot() )
139 ## change uid to <uid> (default: don't care)
140 server.username = "lighttpd"
142 ## change uid to <uid> (default: don't care)
143 server.groupname = "lighttpd"
146 #compress.cache-dir = "/tmp/lighttpd/cache/compress/"
147 #compress.filetype = ("text/plain", "text/html")
150 ## read proxy.txt for more info
154 # "host" => "192.168.0.101",
160 include_shell "/bin/cat webapps.d/*.conf"
163 ## read fastcgi.txt for more info
168 # "socket" => "/var/run/php/php-fastcgi.sock",
169 # "bin-path" => "/usr/bin/php.fcgi",
174 #### standalone of php-fcgi
175 # if you want to use standalone version of php.fcgi
176 # install php-fcgi-init , start php-fcgi and then start lighttpd
180 # ( "host" => "127.0.0.1",
190 # ".pl" => "/usr/bin/perl",
191 # ".cgi" => "/usr/bin/perl",
195 #ssl.engine = "enable"
196 #ssl.pemfile = "server.pem"
199 #status.status-url = "/server-status"
200 #status.config-url = "/server-config"
203 ## read authentication.txt for more info
205 # 0 for off, 1 for 'auth-ok' messages, 2 for verbose debugging
208 # plain, htpasswd, ldap or htdigest
209 #auth.backend = "plain"
210 # filename of the password storage
212 #auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user"
213 #auth.backend.plain.groupfile = "/etc/lighttpd/lighttpd.group"
215 #auth.backend.htpasswd.userfile = "/etc/lighttpd/lighttpd-htpasswd.user"
217 #auth.backend.htdigest.userfile = "/etc/lighttpd/lighttpd-htdigest.user"
219 # the $ in auth.backend.ldap.filter is replaced by the
220 # 'username' from the login dialog
221 #auth.backend.ldap.hostname = "localhost"
222 #auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
223 #auth.backend.ldap.filter = "(uid=$)"
226 # "/server-status" => (
227 # "method" => "digest",
228 # "realm" => "download archiv",
229 # "require" => "user=jan"
231 # "/server-info" => (
232 # "method" => "digest",
233 # "realm" => "download archiv",
234 # "require" => "valid-user"
238 #### url handling modules (rewrite, redirect, access)
240 # "^/$" => "/server-status",
243 # "^/wishlist/(.+)" => "http://www.123.org/$1",
245 #### both rewrite/redirect support back reference to regex conditional using %n
246 #$HTTP["host"] =~ "^www\.(.*)" {
247 # url.redirect = ( "^/(.*)" => "http://%1/$1" )
250 # define a pattern for the host url finding
252 # %0 => domain name + tld
254 # %2 => domain name without tld
255 # %3 => subdomain 1 name
256 # %4 => subdomain 2 name
258 #evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
262 # "/buggy/" => "access 2 hours",
263 # "/asdhas/" => "access plus 1 seconds 2 minutes",
267 #ssi.extension = ( ".shtml" )
270 #rrdtool.binary = "/usr/bin/rrdtool"
271 #rrdtool.db-name = "/var/www/lighttpd.rrd"
274 #setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
275 #setenv.add-response-header = ( "X-Secret-Message" => "42" )
277 ## for mod_trigger_b4_dl
278 # trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
279 # trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
280 # trigger-before-download.trigger-url = "^/trigger/"
281 # trigger-before-download.download-url = "^/download/"
282 # trigger-before-download.deny-url = "http://127.0.0.1/index.html"
283 # trigger-before-download.trigger-timeout = 10
286 ## don't forget to add index.cml to server.indexfiles
287 # cml.extension = ".cml"
288 # cml.memcache-hosts = ( "127.0.0.1:11211" )
291 ## variable name without "." is auto prefixed by "var." and becomes "var.bar"
293 #var.mystring = "foo"
297 ## string concat, with integer cast as string, result: "www.foo1.com"
298 #server.name = "www." + mystring + var.bar + ".com"
300 #index-file.names = (foo + ".php") + index-file.names
301 #index-file.names += (foo + ".php")
304 #include /etc/lighttpd/lighttpd-inc.conf
305 ## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
306 #include "lighttpd-inc.conf"
309 #include_shell "echo var.a=1"
310 ## the above is same as:
314 #userdir.path = "public_html"
315 #userdir.exclude-user = ( "root", "postmaster" )
317 ## if set, only users from this list may use the feature
318 #userdir.include-user = ""
322 # "/cgi-bin/" => "/usr/lib/cgi-bin",