]> git.pld-linux.org Git - packages/lighttpd.git/blame - lighttpd.conf
- added mod_evasive
[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
AM
145
146#### compress module
147#compress.cache-dir = "/tmp/lighttpd/cache/compress/"
148#compress.filetype = ("text/plain", "text/html")
149
0a50e972
ER
150#### proxy module
151## read proxy.txt for more info
152#proxy.server = (
153# ".php" => (
154# "localhost" => (
155# "host" => "192.168.0.101",
156# "port" => 80,
157# )
158# )
159#)
160
4ea50529
ER
161include_shell "/bin/cat webapps.d/*.conf"
162
40f84542 163#### fastcgi module
dda0c1c2 164## read fastcgi.txt for more info
c799b856 165#fastcgi.debug = 1
7d62972e
ER
166#fastcgi.server = (
167# ".php" => (
168# "localhost" => (
169# "socket" => "/var/run/php/php-fastcgi.sock",
170# "bin-path" => "/usr/bin/php.fcgi",
171# )
172# )
173#)
174
e1f00dce
SP
175#### standalone of php-fcgi
176# if you want to use standalone version of php.fcgi
177# install php-fcgi-init , start php-fcgi and then start lighttpd
178#
179#fastcgi.server = (
180# ".php" => (
181# ( "host" => "127.0.0.1",
182# "port" => 1026,
183# )
184# )
185#)
186
187
40f84542
AM
188
189#### CGI module
7d62972e
ER
190#cgi.assign = (
191# ".pl" => "/usr/bin/perl",
192# ".cgi" => "/usr/bin/perl",
193#)
40f84542
AM
194
195#### SSL engine
7d62972e
ER
196#ssl.engine = "enable"
197#ssl.pemfile = "server.pem"
40f84542
AM
198
199#### status module
7d62972e
ER
200#status.status-url = "/server-status"
201#status.config-url = "/server-config"
a5400e58 202#status.statistics-url = "/server-stats"
40f84542
AM
203
204#### auth module
b3b8d2ec 205## read authentication.txt for more info
37252fd1
ER
206## debugging
207# 0 for off, 1 for 'auth-ok' messages, 2 for verbose debugging
208#auth.debug = 1
209## type of backend
210# plain, htpasswd, ldap or htdigest
211#auth.backend = "plain"
212# filename of the password storage
213## for plain
214#auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user"
215#auth.backend.plain.groupfile = "/etc/lighttpd/lighttpd.group"
216## for htpasswd
217#auth.backend.htpasswd.userfile = "/etc/lighttpd/lighttpd-htpasswd.user"
218## for htdigest
219#auth.backend.htdigest.userfile = "/etc/lighttpd/lighttpd-htdigest.user"
220## for ldap
221# the $ in auth.backend.ldap.filter is replaced by the
222# 'username' from the login dialog
7d62972e
ER
223#auth.backend.ldap.hostname = "localhost"
224#auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
225#auth.backend.ldap.filter = "(uid=$)"
226
227#auth.require = (
228# "/server-status" => (
229# "method" => "digest",
230# "realm" => "download archiv",
b3b8d2ec 231# "require" => "user=jan"
7d62972e
ER
232# ),
233# "/server-info" => (
234# "method" => "digest",
235# "realm" => "download archiv",
b3b8d2ec
ER
236# "require" => "valid-user"
237# )
7d62972e 238#)
40f84542
AM
239
240#### url handling modules (rewrite, redirect, access)
c799b856
ER
241#url.rewrite = (
242# "^/$" => "/server-status",
243#)
244#url.redirect = (
245# "^/wishlist/(.+)" => "http://www.123.org/$1",
246#)
b3b8d2ec
ER
247#### both rewrite/redirect support back reference to regex conditional using %n
248#$HTTP["host"] =~ "^www\.(.*)" {
249# url.redirect = ( "^/(.*)" => "http://%1/$1" )
250#}
dda0c1c2
ER
251
252# define a pattern for the host url finding
253# %% => % sign
254# %0 => domain name + tld
255# %1 => tld
256# %2 => domain name without tld
257# %3 => subdomain 1 name
258# %4 => subdomain 2 name
259#
7d62972e 260#evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
40f84542 261
9d396dc3 262#### expire module
7d62972e
ER
263#expire.url = (
264# "/buggy/" => "access 2 hours",
265# "/asdhas/" => "access plus 1 seconds 2 minutes",
266#)
dda0c1c2
ER
267
268#### ssi
7d62972e 269#ssi.extension = ( ".shtml" )
dda0c1c2
ER
270
271#### rrdtool
7d62972e
ER
272#rrdtool.binary = "/usr/bin/rrdtool"
273#rrdtool.db-name = "/var/www/lighttpd.rrd"
9d396dc3 274
0a50e972
ER
275#### setenv
276#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
277#setenv.add-response-header = ( "X-Secret-Message" => "42" )
278
b3b8d2ec
ER
279## for mod_trigger_b4_dl
280# trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
281# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
282# trigger-before-download.trigger-url = "^/trigger/"
283# trigger-before-download.download-url = "^/download/"
284# trigger-before-download.deny-url = "http://127.0.0.1/index.html"
285# trigger-before-download.trigger-timeout = 10
286
287## for mod_cml
288## don't forget to add index.cml to server.indexfiles
289# cml.extension = ".cml"
290# cml.memcache-hosts = ( "127.0.0.1:11211" )
291
292#### variable usage:
293## variable name without "." is auto prefixed by "var." and becomes "var.bar"
294#bar = 1
295#var.mystring = "foo"
296
297## integer add
298#bar += 1
299## string concat, with integer cast as string, result: "www.foo1.com"
300#server.name = "www." + mystring + var.bar + ".com"
301## array merge
302#index-file.names = (foo + ".php") + index-file.names
303#index-file.names += (foo + ".php")
304
305#### include
306#include /etc/lighttpd/lighttpd-inc.conf
307## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
308#include "lighttpd-inc.conf"
309
310#### include_shell
311#include_shell "echo var.a=1"
312## the above is same as:
313#var.a=1
314
5c1a52cc 315#### userdir module
7d62972e
ER
316#userdir.path = "public_html"
317#userdir.exclude-user = ( "root", "postmaster" )
5c1a52cc
MW
318#
319## if set, only users from this list may use the feature
7d62972e 320#userdir.include-user = ""
5c1a52cc
MW
321
322#### alias module
7d62972e 323#alias.url = (
7529b2c6 324# "/cgi-bin/" => "/usr/lib/cgi-bin",
7d62972e
ER
325#)
326
This page took 0.155995 seconds and 4 git commands to generate.