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