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
37 # "mod_trigger_b4_dl",
42 ## a static document-root, for virtual-hosting take look at the
43 ## server.virtual-* options
44 server.document-root = "/home/services/lighttpd/html/"
46 ## where to send error-messages to
47 server.errorlog = "/var/log/lighttpd/lighttpd.log"
48 server.pid-file = "/var/run/lighttpd.pid"
50 # files to check for if .../ is requested
58 ## set the event-handler (read the performance section in the manual)
59 # Linux 2.4+ rt-signals linux-rtsig
60 # Linux 2.6+ epoll linux-sysepoll
61 #server.event-handler = "linux-sysepoll"
64 # include, relative to dirname of main config file
65 include "mime.types.conf"
67 # Use the "Content-Type" extended attribute to obtain mime type if possible
68 #mimetype.use-xattr = "enable"
70 ## send a different Server: header
71 ## be nice and keep it at lighttpd
72 #server.tag = "lighttpd"
75 accesslog.filename = "/var/log/lighttpd/access.log"
77 ## deny access the file-extensions
79 # ~ is for backupfiles from vi, emacs, joe, ...
80 # .inc is often used for code includes which should in general not be part
81 # of the document-root
82 url.access-deny = ( "~", ".inc" )
84 $HTTP["url"] =~ "\.pdf$" {
85 server.range-requests = "disable"
89 # which extensions should not be handle via static-file transfer
91 # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
92 static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
94 ######### Options that are good to be but not neccesary to be changed #######
96 ## bind to port (default: 80)
99 ## bind to localhost (default: all interfaces)
100 #server.bind = "grisu.home.kneschke.de"
102 ## error-handler for status 404
103 #server.error-handler-404 = "/error-handler.html"
104 #server.error-handler-404 = "/error-handler.php"
108 ## If you want name-based virtual hosting add the next three settings and load
112 ## virtual-server-root + virtual-server-default-host + virtual-server-docroot
114 ## virtual-server-root + http-host + virtual-server-docroot
116 #simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
117 #simple-vhost.default-host = "grisu.home.kneschke.de"
118 #simple-vhost.document-root = "/pages/"
122 ## Format: <errorfile-prefix><status-code>.html
123 ## -> ..../status-404.html for 'File not found'
124 #server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"
126 ## virtual directory listings
127 #server.dir-listing = "enable"
130 #debug.log-request-header = "enable"
131 #debug.log-response-header = "enable"
132 #debug.log-request-handling = "enable"
133 #debug.log-file-not-found = "enable"
135 ### only root can use these options
137 # chroot() to directory (default: no chroot() )
140 ## change uid to <uid> (default: don't care)
141 server.username = "lighttpd"
143 ## change uid to <uid> (default: don't care)
144 server.groupname = "lighttpd"
148 #connection.kbytes-per-second = 32
149 #server.kbytes-per-second = 128
152 #compress.cache-dir = "/tmp/lighttpd/cache/compress/"
153 #compress.filetype = ("text/plain", "text/html")
156 ## read proxy.txt for more info
160 # "host" => "192.168.0.101",
166 include_shell "/bin/cat webapps.d/*.conf"
169 ## read fastcgi.txt for more info
174 # "socket" => "/var/run/php/php-fastcgi.sock",
175 # "bin-path" => "/usr/bin/php.fcgi",
180 #### standalone of php-fcgi
181 # if you want to use standalone version of php.fcgi
182 # install php-fcgi-init , start php-fcgi and then start lighttpd
186 # ( "host" => "127.0.0.1",
196 # ".pl" => "/usr/bin/perl",
197 # ".cgi" => "/usr/bin/perl",
201 #ssl.engine = "enable"
202 #ssl.pemfile = "server.pem"
205 #status.status-url = "/server-status"
206 #status.config-url = "/server-config"
207 #status.statistics-url = "/server-stats"
210 ## read authentication.txt for more info
212 # 0 for off, 1 for 'auth-ok' messages, 2 for verbose debugging
215 # plain, htpasswd, ldap or htdigest
216 #auth.backend = "plain"
217 # filename of the password storage
219 #auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user"
220 #auth.backend.plain.groupfile = "/etc/lighttpd/lighttpd.group"
222 #auth.backend.htpasswd.userfile = "/etc/lighttpd/lighttpd-htpasswd.user"
224 #auth.backend.htdigest.userfile = "/etc/lighttpd/lighttpd-htdigest.user"
226 # the $ in auth.backend.ldap.filter is replaced by the
227 # 'username' from the login dialog
228 #auth.backend.ldap.hostname = "localhost"
229 #auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
230 #auth.backend.ldap.filter = "(uid=$)"
233 # "/server-status" => (
234 # "method" => "digest",
235 # "realm" => "download archiv",
236 # "require" => "user=jan"
238 # "/server-info" => (
239 # "method" => "digest",
240 # "realm" => "download archiv",
241 # "require" => "valid-user"
245 #### url handling modules (rewrite, redirect, access)
247 # "^/$" => "/server-status",
250 # "^/wishlist/(.+)" => "http://www.123.org/$1",
252 #### both rewrite/redirect support back reference to regex conditional using %n
253 #$HTTP["host"] =~ "^www\.(.*)" {
254 # url.redirect = ( "^/(.*)" => "http://%1/$1" )
257 # define a pattern for the host url finding
259 # %0 => domain name + tld
261 # %2 => domain name without tld
262 # %3 => subdomain 1 name
263 # %4 => subdomain 2 name
265 #evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
269 # "/buggy/" => "access 2 hours",
270 # "/asdhas/" => "access plus 1 seconds 2 minutes",
275 ## Limits number of connections per IP
277 #evasive.max-conns-per-ip = 5
280 #ssi.extension = ( ".shtml" )
283 #rrdtool.binary = "/usr/bin/rrdtool"
284 #rrdtool.db-name = "/var/www/lighttpd.rrd"
287 #setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
288 #setenv.add-response-header = ( "X-Secret-Message" => "42" )
290 ## for mod_trigger_b4_dl
291 # trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
292 # trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
293 # trigger-before-download.trigger-url = "^/trigger/"
294 # trigger-before-download.download-url = "^/download/"
295 # trigger-before-download.deny-url = "http://127.0.0.1/index.html"
296 # trigger-before-download.trigger-timeout = 10
299 ## don't forget to add index.cml to server.indexfiles
300 # cml.extension = ".cml"
301 # cml.memcache-hosts = ( "127.0.0.1:11211" )
304 ## variable name without "." is auto prefixed by "var." and becomes "var.bar"
306 #var.mystring = "foo"
310 ## string concat, with integer cast as string, result: "www.foo1.com"
311 #server.name = "www." + mystring + var.bar + ".com"
313 #index-file.names = (foo + ".php") + index-file.names
314 #index-file.names += (foo + ".php")
317 #include /etc/lighttpd/lighttpd-inc.conf
318 ## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
319 #include "lighttpd-inc.conf"
322 #include_shell "echo var.a=1"
323 ## the above is same as:
327 #userdir.path = "public_html"
328 #userdir.exclude-user = ( "root", "postmaster" )
330 ## if set, only users from this list may use the feature
331 #userdir.include-user = ""
335 # "/cgi-bin/" => "/usr/lib/cgi-bin",