]> git.pld-linux.org Git - packages/lighttpd.git/blob - lighttpd.conf
- merged with 1.4.7
[packages/lighttpd.git] / lighttpd.conf
1 # lighttpd configuration file
2 #
3 # use a it as base for lighttpd 1.4 and above
4 #
5 # $Id$
6
7 ############ Options you really have to take care of ####################
8
9 ## modules to load
10 # at least mod_access and mod_accesslog should be loaded
11 # all other module should only be loaded if really neccesary
12 # - saves some time
13 # - saves memory
14
15 server.modules = (
16 #       "mod_rewrite",
17 #       "mod_redirect",
18 #       "mod_alias",
19         "mod_access",
20 #       "mod_cml",
21 #       "mod_trigger_b4_dl",
22 #       "mod_auth",
23 #       "mod_status",
24 #       "mod_setenv",
25 #       "mod_fastcgi",
26 #       "mod_proxy",
27 #       "mod_simple_vhost",
28 #       "mod_evhost",
29 #       "mod_userdir",
30 #       "mod_cgi",
31 #       "mod_compress",
32 #       "mod_ssi",
33 #       "mod_usertrack",
34 #       "mod_expire",
35 #       "mod_secdownload",
36 #       "mod_rrdtool",
37 #       "mod_localizer",
38         "mod_accesslog",
39 )
40
41 ## a static document-root, for virtual-hosting take look at the
42 ## server.virtual-* options
43 server.document-root = "/home/services/lighttpd/html/"
44
45 ## where to send error-messages to
46 server.errorlog = "/var/log/lighttpd/lighttpd.log"
47
48 # files to check for if .../ is requested
49 server.indexfiles = (
50         "index.php",
51         "index.html",
52         "index.htm",
53         "default.htm",
54 )
55
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"
60
61 # mimetype mapping
62 # include, relative to dirname of main config file
63 include "mime.types.conf"
64
65 # Use the "Content-Type" extended attribute to obtain mime type if possible
66 #mimetype.use-xattr = "enable"
67
68 ## send a different Server: header
69 ## be nice and keep it at lighttpd
70 #server.tag = "lighttpd"
71
72 #### accesslog module
73 accesslog.filename = "/var/log/lighttpd/access.log"
74
75 ## deny access the file-extensions
76 #
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" )
81
82 $HTTP["url"] =~ "\.pdf$" {
83         server.range-requests = "disable"
84 }
85
86 ##
87 # which extensions should not be handle via static-file transfer
88 #
89 # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
90 static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
91
92 ######### Options that are good to be but not neccesary to be changed #######
93
94 ## bind to port (default: 80)
95 #server.port = 81
96
97 ## bind to localhost (default: all interfaces)
98 #server.bind = "grisu.home.kneschke.de"
99
100 ## error-handler for status 404
101 #server.error-handler-404 = "/error-handler.html"
102 #server.error-handler-404 = "/error-handler.php"
103
104 ## to help the rc.scripts
105 #server.pid-file = "/var/run/lighttpd.pid"
106
107 ###### virtual hosts
108 ##
109 ##   If you want name-based virtual hosting add the next three settings and load
110 ##   mod_simple_vhost
111 ##
112 ## document-root =
113 ##   virtual-server-root + virtual-server-default-host + virtual-server-docroot
114 ## or
115 ##   virtual-server-root + http-host + virtual-server-docroot
116 ##
117 #simple-vhost.server-root         = "/home/weigon/wwwroot/servers/"
118 #simple-vhost.default-host        = "grisu.home.kneschke.de"
119 #simple-vhost.document-root       = "/pages/"
120
121
122 ##
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-"
126
127 ## virtual directory listings
128 #server.dir-listing          = "enable"
129
130 ## enable debugging
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"
135
136 ### only root can use these options
137 #
138 # chroot() to directory (default: no chroot() )
139 #server.chroot            = "/"
140
141 ## change uid to <uid> (default: don't care)
142 server.username            = "lighttpd"
143
144 ## change uid to <uid> (default: don't care)
145 server.groupname           = "lighttpd"
146
147 #### compress module
148 #compress.cache-dir          = "/tmp/lighttpd/cache/compress/"
149 #compress.filetype           = ("text/plain", "text/html")
150
151 #### proxy module
152 ## read proxy.txt for more info
153 #proxy.server = (
154 #       ".php" => (
155 #               "localhost" => (
156 #                       "host" => "192.168.0.101",
157 #                       "port" => 80,
158 #               )
159 #       )
160 #)
161
162 #### fastcgi module
163 ## read fastcgi.txt for more info
164 #fastcgi.debug = 1
165 #fastcgi.server = (
166 #       ".php" => (
167 #               "localhost" => (
168 #                       "socket" => "/var/run/php/php-fastcgi.sock",
169 #                       "bin-path" => "/usr/bin/php.fcgi",
170 #               )
171 #       )
172 #)
173
174
175 #### CGI module
176 #cgi.assign = (
177 #       ".pl"  => "/usr/bin/perl",
178 #       ".cgi" => "/usr/bin/perl",
179 #)
180
181 #### SSL engine
182 #ssl.engine = "enable"
183 #ssl.pemfile = "server.pem"
184
185 #### status module
186 #status.status-url = "/server-status"
187 #status.config-url = "/server-config"
188
189 #### auth module
190 ## read authentication.txt for more info
191 ## debugging
192 # 0 for off, 1 for 'auth-ok' messages, 2 for verbose debugging
193 #auth.debug = 1
194 ## type of backend
195 # plain, htpasswd, ldap or htdigest
196 #auth.backend = "plain"
197 # filename of the password storage
198 ## for plain
199 #auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user"
200 #auth.backend.plain.groupfile = "/etc/lighttpd/lighttpd.group"
201 ## for htpasswd
202 #auth.backend.htpasswd.userfile = "/etc/lighttpd/lighttpd-htpasswd.user"
203 ## for htdigest
204 #auth.backend.htdigest.userfile = "/etc/lighttpd/lighttpd-htdigest.user"
205 ## for ldap
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=$)"
211
212 #auth.require = (
213 #       "/server-status" => (
214 #               "method"  => "digest",
215 #               "realm"   => "download archiv",
216 #               "require" => "user=jan"
217 #       ),
218 #       "/server-info" => (
219 #               "method"  => "digest",
220 #               "realm"   => "download archiv",
221 #               "require" => "valid-user"
222 #       )
223 #)
224
225 #### url handling modules (rewrite, redirect, access)
226 #url.rewrite = (
227 #       "^/$" => "/server-status",
228 #)
229 #url.redirect = (
230 #       "^/wishlist/(.+)" => "http://www.123.org/$1",
231 #)
232 #### both rewrite/redirect support back reference to regex conditional using %n
233 #$HTTP["host"] =~ "^www\.(.*)" {
234 #       url.redirect = ( "^/(.*)" => "http://%1/$1" )
235 #}
236
237 # define a pattern for the host url finding
238 # %% => % sign
239 # %0 => domain name + tld
240 # %1 => tld
241 # %2 => domain name without tld
242 # %3 => subdomain 1 name
243 # %4 => subdomain 2 name
244 #
245 #evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
246
247 #### expire module
248 #expire.url = (
249 #       "/buggy/" => "access 2 hours",
250 #       "/asdhas/" => "access plus 1 seconds 2 minutes",
251 #)
252
253 #### ssi
254 #ssi.extension = ( ".shtml" )
255
256 #### rrdtool
257 #rrdtool.binary = "/usr/bin/rrdtool"
258 #rrdtool.db-name = "/var/www/lighttpd.rrd"
259
260 #### setenv
261 #setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
262 #setenv.add-response-header = ( "X-Secret-Message" => "42" )
263
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
271
272 ## for mod_cml
273 ## don't forget to add index.cml to server.indexfiles
274 # cml.extension               = ".cml"
275 # cml.memcache-hosts          = ( "127.0.0.1:11211" )
276
277 #### variable usage:
278 ## variable name without "." is auto prefixed by "var." and becomes "var.bar"
279 #bar = 1
280 #var.mystring = "foo"
281
282 ## integer add
283 #bar += 1
284 ## string concat, with integer cast as string, result: "www.foo1.com"
285 #server.name = "www." + mystring + var.bar + ".com"
286 ## array merge
287 #index-file.names = (foo + ".php") + index-file.names
288 #index-file.names += (foo + ".php")
289
290 #### include
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"
294
295 #### include_shell
296 #include_shell "echo var.a=1"
297 ## the above is same as:
298 #var.a=1
299
300 #### userdir module
301 #userdir.path = "public_html"
302 #userdir.exclude-user = ( "root", "postmaster" )
303 #
304 ## if set, only users from this list may use the feature
305 #userdir.include-user = ""
306
307 #### alias module
308 #alias.url = (
309 #       "/cgi-bin/" => "/usr/lib/cgi-bin",
310 #)
311
This page took 0.691382 seconds and 4 git commands to generate.