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