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
38 # "mod_trigger_b4_dl",
43 ## a static document-root, for virtual-hosting take look at the
44 ## server.virtual-* options
45 server.document-root = "/home/services/lighttpd/html/"
47 ## where to send error-messages to
48 server.errorlog = "/var/log/lighttpd/lighttpd.log"
49 server.pid-file = "/var/run/lighttpd.pid"
51 # files to check for if .../ is requested
59 ## set the event-handler (read the performance section in the manual)
60 # Linux 2.4+ rt-signals linux-rtsig
61 # Linux 2.6+ epoll linux-sysepoll
62 #server.event-handler = "linux-sysepoll"
65 # include, relative to dirname of main config file
66 include "mime.types.conf"
68 # Use the "Content-Type" extended attribute to obtain mime type if possible
69 #mimetype.use-xattr = "enable"
71 ## send a different Server: header
72 ## be nice and keep it at lighttpd
73 #server.tag = "lighttpd"
76 accesslog.filename = "/var/log/lighttpd/access.log"
78 ## deny access the file-extensions
80 # ~ is for backupfiles from vi, emacs, joe, ...
81 # .inc is often used for code includes which should in general not be part
82 # of the document-root
83 url.access-deny = ( "~", ".inc" )
85 $HTTP["url"] =~ "\.pdf$" {
86 server.range-requests = "disable"
90 # which extensions should not be handle via static-file transfer
92 # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
93 static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
95 ######### Options that are good to be but not neccesary to be changed #######
97 ## bind to port (default: 80)
100 ## bind to localhost (default: all interfaces)
101 #server.bind = "grisu.home.kneschke.de"
103 ## error-handler for status 404
104 #server.error-handler-404 = "/error-handler.html"
105 #server.error-handler-404 = "/error-handler.php"
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"
149 #connection.kbytes-per-second = 32
150 #server.kbytes-per-second = 128
153 #compress.cache-dir = "/tmp/lighttpd/cache/compress/"
154 #compress.filetype = ("text/plain", "text/html")
157 ## read proxy.txt for more info
161 # "host" => "192.168.0.101",
168 ## read fastcgi.txt for more info
173 # "socket" => "/var/run/php/php-fastcgi.sock",
174 # "bin-path" => "/usr/bin/php.fcgi",
179 #### standalone of php-fcgi
180 # if you want to use standalone version of php.fcgi
181 # install php-fcgi-init , start php-fcgi and then start lighttpd
185 # ( "host" => "127.0.0.1",
195 # ".pl" => "/usr/bin/perl",
196 # ".cgi" => "/usr/bin/perl",
200 #ssl.engine = "enable"
201 #ssl.pemfile = "server.pem"
204 #status.status-url = "/server-status"
205 #status.config-url = "/server-config"
206 #status.statistics-url = "/server-stats"
209 ## read authentication.txt for more info
211 # 0 for off, 1 for 'auth-ok' messages, 2 for verbose debugging
214 # plain, htpasswd, ldap or htdigest
215 #auth.backend = "plain"
216 # filename of the password storage
218 #auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user"
219 #auth.backend.plain.groupfile = "/etc/lighttpd/lighttpd.group"
221 #auth.backend.htpasswd.userfile = "/etc/lighttpd/lighttpd-htpasswd.user"
223 #auth.backend.htdigest.userfile = "/etc/lighttpd/lighttpd-htdigest.user"
225 # the $ in auth.backend.ldap.filter is replaced by the
226 # 'username' from the login dialog
227 #auth.backend.ldap.hostname = "localhost"
228 #auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
229 #auth.backend.ldap.filter = "(uid=$)"
232 # "/server-status" => (
233 # "method" => "digest",
234 # "realm" => "download archiv",
235 # "require" => "user=jan"
237 # "/server-info" => (
238 # "method" => "digest",
239 # "realm" => "download archiv",
240 # "require" => "valid-user"
244 #### url handling modules (rewrite, redirect, access)
246 # "^/$" => "/server-status",
249 # "^/wishlist/(.+)" => "http://www.123.org/$1",
251 #### both rewrite/redirect support back reference to regex conditional using %n
252 #$HTTP["host"] =~ "^www\.(.*)" {
253 # url.redirect = ( "^/(.*)" => "http://%1/$1" )
256 # define a pattern for the host url finding
258 # %0 => domain name + tld
260 # %2 => domain name without tld
261 # %3 => subdomain 1 name
262 # %4 => subdomain 2 name
264 #evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
268 # "/buggy/" => "access 2 hours",
269 # "/asdhas/" => "access plus 1 seconds 2 minutes",
274 ## Limits number of connections per IP
276 #evasive.max-conns-per-ip = 5
280 ## Allows compress all output dynamic or static
282 #deflate.enabled = "enable"
283 #deflate.compression-level = 9
284 #deflate.mem-level = 9
285 #deflate.window-size = 15
286 #deflate.bzip2 = "enable"
287 #deflate.min-compress-size = 200
288 #deflate.sync-flush = "enable"
289 #deflate.output-buffer-size = 8192
290 #deflate.work-block-size = 512
291 #deflate.mimetypes = ("text/html", "text/plain")
292 #deflate.debug = "enable"
295 #ssi.extension = ( ".shtml" )
298 #rrdtool.binary = "/usr/bin/rrdtool"
299 #rrdtool.db-name = "/var/www/lighttpd.rrd"
302 #setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
303 #setenv.add-response-header = ( "X-Secret-Message" => "42" )
305 ## for mod_trigger_b4_dl
306 # trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
307 # trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
308 # trigger-before-download.trigger-url = "^/trigger/"
309 # trigger-before-download.download-url = "^/download/"
310 # trigger-before-download.deny-url = "http://127.0.0.1/index.html"
311 # trigger-before-download.trigger-timeout = 10
314 ## don't forget to add index.cml to server.indexfiles
315 # cml.extension = ".cml"
316 # cml.memcache-hosts = ( "127.0.0.1:11211" )
319 ## variable name without "." is auto prefixed by "var." and becomes "var.bar"
321 #var.mystring = "foo"
325 ## string concat, with integer cast as string, result: "www.foo1.com"
326 #server.name = "www." + mystring + var.bar + ".com"
328 #index-file.names = (foo + ".php") + index-file.names
329 #index-file.names += (foo + ".php")
332 #include /etc/lighttpd/lighttpd-inc.conf
333 ## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
334 #include "lighttpd-inc.conf"
337 #include_shell "echo var.a=1"
338 ## the above is same as:
342 #userdir.path = "public_html"
343 #userdir.exclude-user = ( "root", "postmaster" )
345 ## if set, only users from this list may use the feature
346 #userdir.include-user = ""
350 # "/cgi-bin/" => "/usr/lib/cgi-bin",
353 include_shell "/bin/cat webapps.d/*.conf"