]> git.pld-linux.org Git - packages/lighttpd.git/blame - lighttpd.conf
- use pidfile so only one instance is killed
[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"
40f84542
AM
47
48# files to check for if .../ is requested
7d62972e
ER
49server.indexfiles = (
50 "index.php",
51 "index.html",
52 "index.htm",
53 "default.htm",
54)
40f84542 55
b3b8d2ec
ER
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
40f84542 61# mimetype mapping
39902917
ER
62# include, relative to dirname of main config file
63include "mime.types.conf"
dda0c1c2
ER
64
65# Use the "Content-Type" extended attribute to obtain mime type if possible
7d62972e 66#mimetype.use-xattr = "enable"
2f595477 67
0a50e972
ER
68## send a different Server: header
69## be nice and keep it at lighttpd
70#server.tag = "lighttpd"
71
40f84542 72#### accesslog module
7d62972e 73accesslog.filename = "/var/log/lighttpd/access.log"
40f84542
AM
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
7d62972e 80url.access-deny = ( "~", ".inc" )
40f84542 81
b3b8d2ec
ER
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
90static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
91
40f84542
AM
92######### Options that are good to be but not neccesary to be changed #######
93
94## bind to port (default: 80)
7d62972e 95#server.port = 81
40f84542
AM
96
97## bind to localhost (default: all interfaces)
7d62972e 98#server.bind = "grisu.home.kneschke.de"
40f84542 99
dda0c1c2 100## error-handler for status 404
7d62972e
ER
101#server.error-handler-404 = "/error-handler.html"
102#server.error-handler-404 = "/error-handler.php"
dda0c1c2
ER
103
104## to help the rc.scripts
7d62972e 105#server.pid-file = "/var/run/lighttpd.pid"
40f84542
AM
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 =
b3b8d2ec
ER
113## virtual-server-root + virtual-server-default-host + virtual-server-docroot
114## or
40f84542
AM
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
7d62972e 122##
ef2634ff 123## Format: <errorfile-prefix><status-code>.html
40f84542 124## -> ..../status-404.html for 'File not found'
7d62972e 125#server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"
40f84542
AM
126
127## virtual directory listings
128#server.dir-listing = "enable"
129
ae08eb54
ER
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
40f84542
AM
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)
a2a346d6 142server.username = "lighttpd"
40f84542
AM
143
144## change uid to <uid> (default: don't care)
a2a346d6 145server.groupname = "lighttpd"
40f84542
AM
146
147#### compress module
148#compress.cache-dir = "/tmp/lighttpd/cache/compress/"
149#compress.filetype = ("text/plain", "text/html")
150
0a50e972
ER
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
40f84542 162#### fastcgi module
dda0c1c2 163## read fastcgi.txt for more info
c799b856 164#fastcgi.debug = 1
7d62972e
ER
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
40f84542
AM
174
175#### CGI module
7d62972e
ER
176#cgi.assign = (
177# ".pl" => "/usr/bin/perl",
178# ".cgi" => "/usr/bin/perl",
179#)
40f84542
AM
180
181#### SSL engine
7d62972e
ER
182#ssl.engine = "enable"
183#ssl.pemfile = "server.pem"
40f84542
AM
184
185#### status module
7d62972e
ER
186#status.status-url = "/server-status"
187#status.config-url = "/server-config"
40f84542
AM
188
189#### auth module
b3b8d2ec 190## read authentication.txt for more info
37252fd1
ER
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
7d62972e
ER
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",
b3b8d2ec 216# "require" => "user=jan"
7d62972e
ER
217# ),
218# "/server-info" => (
219# "method" => "digest",
220# "realm" => "download archiv",
b3b8d2ec
ER
221# "require" => "valid-user"
222# )
7d62972e 223#)
40f84542
AM
224
225#### url handling modules (rewrite, redirect, access)
c799b856
ER
226#url.rewrite = (
227# "^/$" => "/server-status",
228#)
229#url.redirect = (
230# "^/wishlist/(.+)" => "http://www.123.org/$1",
231#)
b3b8d2ec
ER
232#### both rewrite/redirect support back reference to regex conditional using %n
233#$HTTP["host"] =~ "^www\.(.*)" {
234# url.redirect = ( "^/(.*)" => "http://%1/$1" )
235#}
dda0c1c2
ER
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#
7d62972e 245#evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
40f84542 246
9d396dc3 247#### expire module
7d62972e
ER
248#expire.url = (
249# "/buggy/" => "access 2 hours",
250# "/asdhas/" => "access plus 1 seconds 2 minutes",
251#)
dda0c1c2
ER
252
253#### ssi
7d62972e 254#ssi.extension = ( ".shtml" )
dda0c1c2
ER
255
256#### rrdtool
7d62972e
ER
257#rrdtool.binary = "/usr/bin/rrdtool"
258#rrdtool.db-name = "/var/www/lighttpd.rrd"
9d396dc3 259
0a50e972
ER
260#### setenv
261#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
262#setenv.add-response-header = ( "X-Secret-Message" => "42" )
263
b3b8d2ec
ER
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
5c1a52cc 300#### userdir module
7d62972e
ER
301#userdir.path = "public_html"
302#userdir.exclude-user = ( "root", "postmaster" )
5c1a52cc
MW
303#
304## if set, only users from this list may use the feature
7d62972e 305#userdir.include-user = ""
5c1a52cc
MW
306
307#### alias module
7d62972e 308#alias.url = (
7529b2c6 309# "/cgi-bin/" => "/usr/lib/cgi-bin",
7d62972e
ER
310#)
311
This page took 0.103504 seconds and 4 git commands to generate.