1 # Debian lighttpd configuration file
4 ############ Options you really have to take care of ####################
7 # mod_access, mod_accesslog and mod_alias are loaded by default
8 # all other module should only be loaded if neccesary
25 # "mod_flv_streaming",
29 ## a static document-root, for virtual-hosting take look at the
30 ## server.virtual-* options
31 server.document-root = "/var/www/"
33 ## where to upload files to, purged daily.
34 server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
36 ## where to send error-messages to
37 server.errorlog = "/var/log/lighttpd/error.log"
39 ## files to check for if .../ is requested
40 index-file.names = ( "index.php", "index.html",
41 "index.htm", "default.htm",
42 "index.lighttpd.html" )
45 ## Use the "Content-Type" extended attribute to obtain mime type if possible
46 # mimetype.use-xattr = "enable"
49 accesslog.filename = "/var/log/lighttpd/access.log"
51 ## deny access the file-extensions
53 # ~ is for backupfiles from vi, emacs, joe, ...
54 # .inc is often used for code includes which should in general not be part
55 # of the document-root
56 url.access-deny = ( "~", ".inc" )
59 # which extensions should not be handle via static-file transfer
61 # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
62 static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
65 ######### Options that are good to be but not neccesary to be changed #######
67 ## Use ipv6 only if available.
68 include_shell "/usr/share/lighttpd/use-ipv6.pl"
70 ## bind to port (default: 80)
73 ## bind to localhost only (default: all interfaces)
74 ## server.bind = "localhost"
76 ## error-handler for status 404
77 #server.error-handler-404 = "/error-handler.html"
78 #server.error-handler-404 = "/error-handler.php"
80 ## to help the rc.scripts
81 server.pid-file = "/var/run/lighttpd.pid"
84 ## Format: <errorfile-prefix><status>.html
85 ## -> ..../status-404.html for 'File not found'
86 #server.errorfile-prefix = "/var/www/"
88 ## virtual directory listings
89 dir-listing.encoding = "utf-8"
90 server.dir-listing = "enable"
92 ## send unhandled HTTP-header headers to error-log
93 #debug.dump-unknown-headers = "enable"
95 ### only root can use these options
97 # chroot() to directory (default: no chroot() )
100 ## change uid to <uid> (default: don't care)
101 server.username = "www-data"
103 ## change uid to <uid> (default: don't care)
104 server.groupname = "www-data"
107 compress.cache-dir = "/var/cache/lighttpd/compress/"
108 compress.filetype = ("text/plain", "text/html", "application/x-javascript", "text/css")
111 #### url handling modules (rewrite, redirect, access)
112 # url.rewrite = ( "^/$" => "/server-status" )
113 # url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
116 # define a pattern for the host url finding
118 # %0 => domain name + tld
120 # %2 => domain name without tld
121 # %3 => subdomain 1 name
122 # %4 => subdomain 2 name
124 # evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
127 # expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
130 # rrdtool.binary = "/usr/bin/rrdtool"
131 # rrdtool.db-name = "/var/www/lighttpd.rrd"
135 ## variable name without "." is auto prefixed by "var." and becomes "var.bar"
137 #var.mystring = "foo"
141 ## string concat, with integer cast as string, result: "www.foo1.com"
142 #server.name = "www." + mystring + var.bar + ".com"
144 #index-file.names = (foo + ".php") + index-file.names
145 #index-file.names += (foo + ".php")
148 #### external configuration files
150 include_shell "/usr/share/lighttpd/create-mime.assign.pl"
152 ## load enabled configuration files,
153 ## read /etc/lighttpd/conf-available/README first
154 include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
156 #### handle Debian Policy Manual, Section 11.5. urls
157 ## by default allow them only from localhost
158 ## (This must come last due to #445459)
159 ## Note: =~ "127.0.0.1" works with ipv6 enabled, whereas == "127.0.0.1" doesn't
160 $HTTP["remoteip"] =~ "127.0.0.1" {
162 "/doc/" => "/usr/share/doc/",
163 "/images/" => "/usr/share/images/"
165 $HTTP["url"] =~ "^/doc/|^/images/" {
166 dir-listing.activate = "enable"
170 $HTTP["host"] == "hydroponie" {
171 server.server-root = "/var/www"
172 server.document-root = "/"
174 fastcgi.server = ( "/scripts/" =>
175 (( "bin-path" => "/home/bohacekm/fel/X36BAP/hydroweb/src/hydroponie",
176 "socket" => "/tmp/hydro.socket",
178 "check-local" => "disable",
179 "docroot" => "/scripts/" # remote server may use
186 #$HTTP["host"] == "threads" {
187 # server.server-root = "/var/www"
188 # server.document-root = "/"
190 # fastcgi.server = ( "/" =>
191 # (( "bin-path" => "/home/bohacekm/src/qt_lighttpd_test/fcgi_testapp",
192 # "socket" => "/tmp/fcgi_testapp.socket",
194 # "check-local" => "disable",
195 # "docroot" => "/" # remote server may use