]> git.pld-linux.org Git - packages/lighttpd.git/blob - lighttpd.conf
- tabs
[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_access",
17         "mod_accesslog",
18 #       "mod_alias",
19 #       "mod_auth",
20 #       "mod_cgi",
21 #       "mod_cml",
22 #       "mod_compress",
23 #       "mod_deflate",
24 #       "mod_evasive",
25 #       "mod_evhost",
26 #       "mod_expire",
27 #       "mod_fastcgi",
28 #       "mod_localizer",
29 #       "mod_proxy",
30 #       "mod_redirect",
31 #       "mod_rewrite",
32 #       "mod_rrdtool",
33 #       "mod_secdownload",
34 #       "mod_setenv",
35 #       "mod_simple_vhost",
36 #       "mod_ssi",
37 #       "mod_status",
38 #       "mod_trigger_b4_dl",
39 #       "mod_userdir",
40 #       "mod_usertrack",
41 )
42
43 ## a static document-root, for virtual-hosting take look at the
44 ## server.virtual-* options
45 server.document-root = "/home/services/lighttpd/html/"
46
47 ## where to send error-messages to
48 server.errorlog = "/var/log/lighttpd/lighttpd.log"
49 server.pid-file = "/var/run/lighttpd.pid"
50
51 # files to check for if .../ is requested
52 server.indexfiles = (
53         "index.php",
54         "index.html",
55         "index.htm",
56         "default.htm",
57 )
58
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"
63
64 # mimetype mapping
65 # include, relative to dirname of main config file
66 include "mime.types.conf"
67
68 # Use the "Content-Type" extended attribute to obtain mime type if possible
69 #mimetype.use-xattr = "enable"
70
71 ## send a different Server: header
72 ## be nice and keep it at lighttpd
73 #server.tag = "lighttpd"
74
75 #### accesslog module
76 accesslog.filename = "/var/log/lighttpd/access.log"
77
78 ## deny access the file-extensions
79 #
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" )
84
85 $HTTP["url"] =~ "\.pdf$" {
86         server.range-requests = "disable"
87 }
88
89 ##
90 # which extensions should not be handle via static-file transfer
91 #
92 # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
93 static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
94
95 ######### Options that are good to be but not neccesary to be changed #######
96
97 ## bind to port (default: 80)
98 #server.port = 81
99
100 ## bind to localhost (default: all interfaces)
101 #server.bind = "grisu.home.kneschke.de"
102
103 ## error-handler for status 404
104 #server.error-handler-404 = "/error-handler.html"
105 #server.error-handler-404 = "/error-handler.php"
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 # Traffic Shaping
148 #
149 #connection.kbytes-per-second = 32
150 #server.kbytes-per-second = 128
151
152 #### compress module
153 #compress.cache-dir          = "/tmp/lighttpd/cache/compress/"
154 #compress.filetype           = ("text/plain", "text/html")
155
156 #### proxy module
157 ## read proxy.txt for more info
158 #proxy.server = (
159 #       ".php" => (
160 #               "localhost" => (
161 #                       "host" => "192.168.0.101",
162 #                       "port" => 80,
163 #               )
164 #       )
165 #)
166
167 #### fastcgi module
168 ## read fastcgi.txt for more info
169 #fastcgi.debug = 1
170 #fastcgi.server = (
171 #       ".php" => (
172 #               "localhost" => (
173 #                       "socket" => "/var/run/php/php-fastcgi.sock",
174 #                       "bin-path" => "/usr/bin/php.fcgi",
175 #               )
176 #       )
177 #)
178
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
182 #
183 #fastcgi.server = ( 
184 #       ".php" => (
185 #               ( "host" => "127.0.0.1",
186 #                 "port" => 1026,
187 #               )
188 #       )
189 #)
190
191
192
193 #### CGI module
194 #cgi.assign = (
195 #       ".pl"  => "/usr/bin/perl",
196 #       ".cgi" => "/usr/bin/perl",
197 #)
198
199 #### SSL engine
200 #ssl.engine = "enable"
201 #ssl.pemfile = "server.pem"
202
203 #### status module
204 #status.status-url = "/server-status"
205 #status.config-url = "/server-config"
206 #status.statistics-url = "/server-stats"
207
208 #### auth module
209 ## read authentication.txt for more info
210 ## debugging
211 # 0 for off, 1 for 'auth-ok' messages, 2 for verbose debugging
212 #auth.debug = 1
213 ## type of backend
214 # plain, htpasswd, ldap or htdigest
215 #auth.backend = "plain"
216 # filename of the password storage
217 ## for plain
218 #auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user"
219 #auth.backend.plain.groupfile = "/etc/lighttpd/lighttpd.group"
220 ## for htpasswd
221 #auth.backend.htpasswd.userfile = "/etc/lighttpd/lighttpd-htpasswd.user"
222 ## for htdigest
223 #auth.backend.htdigest.userfile = "/etc/lighttpd/lighttpd-htdigest.user"
224 ## for ldap
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=$)"
230
231 #auth.require = (
232 #       "/server-status" => (
233 #               "method"  => "digest",
234 #               "realm"   => "download archiv",
235 #               "require" => "user=jan"
236 #       ),
237 #       "/server-info" => (
238 #               "method"  => "digest",
239 #               "realm"   => "download archiv",
240 #               "require" => "valid-user"
241 #       )
242 #)
243
244 #### url handling modules (rewrite, redirect, access)
245 #url.rewrite = (
246 #       "^/$" => "/server-status",
247 #)
248 #url.redirect = (
249 #       "^/wishlist/(.+)" => "http://www.123.org/$1",
250 #)
251 #### both rewrite/redirect support back reference to regex conditional using %n
252 #$HTTP["host"] =~ "^www\.(.*)" {
253 #       url.redirect = ( "^/(.*)" => "http://%1/$1" )
254 #}
255
256 # define a pattern for the host url finding
257 # %% => % sign
258 # %0 => domain name + tld
259 # %1 => tld
260 # %2 => domain name without tld
261 # %3 => subdomain 1 name
262 # %4 => subdomain 2 name
263 #
264 #evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
265
266 #### expire module
267 #expire.url = (
268 #       "/buggy/" => "access 2 hours",
269 #       "/asdhas/" => "access plus 1 seconds 2 minutes",
270 #)
271
272 #### evasive module
273 ##
274 ## Limits number of connections per IP
275 ##
276 #evasive.max-conns-per-ip = 5
277
278 #### deflate module
279 ##
280 ## Allows compress all output dynamic or static
281 ##
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"
293
294 #### ssi
295 #ssi.extension = ( ".shtml" )
296
297 #### rrdtool
298 #rrdtool.binary = "/usr/bin/rrdtool"
299 #rrdtool.db-name = "/var/www/lighttpd.rrd"
300
301 #### setenv
302 #setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
303 #setenv.add-response-header = ( "X-Secret-Message" => "42" )
304
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
312
313 ## for mod_cml
314 ## don't forget to add index.cml to server.indexfiles
315 # cml.extension               = ".cml"
316 # cml.memcache-hosts          = ( "127.0.0.1:11211" )
317
318 #### variable usage:
319 ## variable name without "." is auto prefixed by "var." and becomes "var.bar"
320 #bar = 1
321 #var.mystring = "foo"
322
323 ## integer add
324 #bar += 1
325 ## string concat, with integer cast as string, result: "www.foo1.com"
326 #server.name = "www." + mystring + var.bar + ".com"
327 ## array merge
328 #index-file.names = (foo + ".php") + index-file.names
329 #index-file.names += (foo + ".php")
330
331 #### include
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"
335
336 #### include_shell
337 #include_shell "echo var.a=1"
338 ## the above is same as:
339 #var.a=1
340
341 #### userdir module
342 #userdir.path = "public_html"
343 #userdir.exclude-user = ( "root", "postmaster" )
344 #
345 ## if set, only users from this list may use the feature
346 #userdir.include-user = ""
347
348 #### alias module
349 #alias.url = (
350 #       "/cgi-bin/" => "/usr/lib/cgi-bin",
351 #)
352
353 include_shell "/bin/cat webapps.d/*.conf"
This page took 0.073528 seconds and 4 git commands to generate.