]> git.pld-linux.org Git - packages/lighttpd.git/blame - lighttpd.conf
- sort mime types by extension
[packages/lighttpd.git] / lighttpd.conf
CommitLineData
40f84542 1# lighttpd configuration file
7d62972e 2#
40f84542
AM
3# use a it as base for lighttpd 1.0.0 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
7d62972e
ER
14
15server.modules = (
16# "mod_rewrite",
17# "mod_redirect",
0a50e972 18# "mod_alias",
7d62972e
ER
19 "mod_access",
20# "mod_auth",
21# "mod_status",
0a50e972 22# "mod_setenv",
7d62972e 23# "mod_fastcgi",
0a50e972 24# "mod_proxy",
7d62972e
ER
25# "mod_simple_vhost",
26# "mod_evhost",
0a50e972 27# "mod_userdir",
7d62972e
ER
28# "mod_cgi",
29# "mod_compress",
7d62972e
ER
30# "mod_ssi",
31# "mod_usertrack",
42926b06 32# "mod_expire",
42926b06 33# "mod_secdownload",
0a50e972
ER
34# "mod_rrdtool",
35# "mod_localizer",
7d62972e
ER
36 "mod_accesslog",
37)
38
39## a static document-root, for virtual-hosting take look at the
40f84542 40## server.virtual-* options
7d62972e 41server.document-root = "/home/services/lighttpd/html/"
40f84542
AM
42
43## where to send error-messages to
7d62972e 44server.errorlog = "/var/log/lighttpd/lighttpd.log"
40f84542
AM
45
46# files to check for if .../ is requested
7d62972e
ER
47server.indexfiles = (
48 "index.php",
49 "index.html",
50 "index.htm",
51 "default.htm",
52)
40f84542
AM
53
54# mimetype mapping
7d62972e 55mimetype.assign = (
7d17df4a
ER
56 ".asc" => "text/plain",
57 ".asf" => "video/x-ms-asf",
58 ".asx" => "video/x-ms-asf",
59 ".avi" => "video/x-msvideo",
60 ".bz2" => "application/x-bzip",
61 ".c" => "text/plain",
7d62972e 62 ".class" => "application/octet-stream",
7d17df4a
ER
63 ".conf" => "text/plain",
64 ".css" => "text/css",
65 ".dtd" => "text/xml",
7d62972e 66 ".dvi" => "application/x-dvi",
7d17df4a 67 ".gif" => "image/gif",
7d62972e 68 ".gz" => "application/x-gzip",
7d17df4a
ER
69 ".htm" => "text/html",
70 ".html" => "text/html",
71 ".jpeg" => "image/jpeg",
72 ".jpg" => "image/jpeg",
73 ".js" => "text/javascript",
74 ".m3u" => "audio/x-mpegurl",
75 ".mov" => "video/quicktime",
76 ".mp3" => "audio/mpeg",
77 ".mpeg" => "video/mpeg",
78 ".mpg" => "video/mpeg",
79 ".ogg" => "application/ogg",
7d62972e 80 ".pac" => "application/x-ns-proxy-autoconfig",
7d17df4a
ER
81 ".pdf" => "application/pdf",
82 ".png" => "image/png",
83 ".ps" => "application/postscript",
84 ".qt" => "video/quicktime",
85 ".rpm" => "application/x-rpm",
86 ".sig" => "application/pgp-signature",
87 ".spl" => "application/futuresplash",
7d62972e 88 ".swf" => "application/x-shockwave-flash",
7d17df4a
ER
89 ".tar" => "application/x-tar",
90 ".tar.bz2" => "application/x-bzip-compressed-tar"
7d62972e 91 ".tar.gz" => "application/x-tgz",
7d17df4a
ER
92 ".tbz" => "application/x-bzip-compressed-tar",
93 ".text" => "text/plain",
7d62972e 94 ".tgz" => "application/x-tgz",
7d17df4a
ER
95 ".torrent" => "application/x-bittorrent",
96 ".txt" => "text/plain",
7d62972e 97 ".wav" => "audio/x-wav",
7d17df4a
ER
98 ".wax" => "audio/x-ms-wax",
99 ".wma" => "audio/x-ms-wma",
100 ".wmv" => "video/x-ms-wmv",
7d62972e 101 ".xbm" => "image/x-xbitmap",
7d17df4a 102 ".xml" => "text/xml",
7d62972e
ER
103 ".xpm" => "image/x-xpixmap",
104 ".xwd" => "image/x-xwindowdump",
7d17df4a 105 ".zip" => "application/zip",
dda0c1c2
ER
106)
107
108# Use the "Content-Type" extended attribute to obtain mime type if possible
7d62972e 109#mimetype.use-xattr = "enable"
2f595477 110
0a50e972
ER
111## send a different Server: header
112## be nice and keep it at lighttpd
113#server.tag = "lighttpd"
114
40f84542 115#### accesslog module
7d62972e 116accesslog.filename = "/var/log/lighttpd/access.log"
40f84542
AM
117
118## deny access the file-extensions
119#
120# ~ is for backupfiles from vi, emacs, joe, ...
121# .inc is often used for code includes which should in general not be part
122# of the document-root
7d62972e 123url.access-deny = ( "~", ".inc" )
40f84542
AM
124
125######### Options that are good to be but not neccesary to be changed #######
126
127## bind to port (default: 80)
7d62972e 128#server.port = 81
40f84542
AM
129
130## bind to localhost (default: all interfaces)
7d62972e 131#server.bind = "grisu.home.kneschke.de"
40f84542 132
dda0c1c2 133## error-handler for status 404
7d62972e
ER
134#server.error-handler-404 = "/error-handler.html"
135#server.error-handler-404 = "/error-handler.php"
dda0c1c2
ER
136
137## to help the rc.scripts
7d62972e 138#server.pid-file = "/var/run/lighttpd.pid"
40f84542
AM
139
140###### virtual hosts
141##
142## If you want name-based virtual hosting add the next three settings and load
143## mod_simple_vhost
144##
145## document-root =
146## virtual-server-root + virtual-server-default-host + virtual-server-docroot or
147## virtual-server-root + http-host + virtual-server-docroot
148##
149#simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
150#simple-vhost.default-host = "grisu.home.kneschke.de"
151#simple-vhost.document-root = "/pages/"
152
153
7d62972e 154##
ef2634ff 155## Format: <errorfile-prefix><status-code>.html
40f84542 156## -> ..../status-404.html for 'File not found'
7d62972e 157#server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"
40f84542
AM
158
159## virtual directory listings
160#server.dir-listing = "enable"
161
ae08eb54
ER
162## enable debugging
163#debug.log-request-header = "enable"
164#debug.log-response-header = "enable"
165#debug.log-request-handling = "enable"
166#debug.log-file-not-found = "enable"
167
40f84542
AM
168### only root can use these options
169#
170# chroot() to directory (default: no chroot() )
171#server.chroot = "/"
172
173## change uid to <uid> (default: don't care)
a2a346d6 174server.username = "lighttpd"
40f84542
AM
175
176## change uid to <uid> (default: don't care)
a2a346d6 177server.groupname = "lighttpd"
40f84542
AM
178
179#### compress module
180#compress.cache-dir = "/tmp/lighttpd/cache/compress/"
181#compress.filetype = ("text/plain", "text/html")
182
0a50e972
ER
183#### proxy module
184## read proxy.txt for more info
185#proxy.server = (
186# ".php" => (
187# "localhost" => (
188# "host" => "192.168.0.101",
189# "port" => 80,
190# )
191# )
192#)
193
40f84542 194#### fastcgi module
dda0c1c2 195## read fastcgi.txt for more info
c799b856 196#fastcgi.debug = 1
7d62972e
ER
197#fastcgi.server = (
198# ".php" => (
199# "localhost" => (
200# "socket" => "/var/run/php/php-fastcgi.sock",
201# "bin-path" => "/usr/bin/php.fcgi",
202# )
203# )
204#)
205
40f84542
AM
206
207#### CGI module
7d62972e
ER
208#cgi.assign = (
209# ".pl" => "/usr/bin/perl",
210# ".cgi" => "/usr/bin/perl",
211#)
40f84542
AM
212
213#### SSL engine
7d62972e
ER
214#ssl.engine = "enable"
215#ssl.pemfile = "server.pem"
40f84542
AM
216
217#### status module
7d62972e
ER
218#status.status-url = "/server-status"
219#status.config-url = "/server-config"
40f84542
AM
220
221#### auth module
dda0c1c2 222## read authentification.txt for more info
37252fd1
ER
223## debugging
224# 0 for off, 1 for 'auth-ok' messages, 2 for verbose debugging
225#auth.debug = 1
226## type of backend
227# plain, htpasswd, ldap or htdigest
228#auth.backend = "plain"
229# filename of the password storage
230## for plain
231#auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user"
232#auth.backend.plain.groupfile = "/etc/lighttpd/lighttpd.group"
233## for htpasswd
234#auth.backend.htpasswd.userfile = "/etc/lighttpd/lighttpd-htpasswd.user"
235## for htdigest
236#auth.backend.htdigest.userfile = "/etc/lighttpd/lighttpd-htdigest.user"
237## for ldap
238# the $ in auth.backend.ldap.filter is replaced by the
239# 'username' from the login dialog
7d62972e
ER
240#auth.backend.ldap.hostname = "localhost"
241#auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
242#auth.backend.ldap.filter = "(uid=$)"
243
244#auth.require = (
245# "/server-status" => (
246# "method" => "digest",
247# "realm" => "download archiv",
37252fd1 248# "require" => "user=agent007|user=agent008"
7d62972e
ER
249# ),
250# "/server-info" => (
251# "method" => "digest",
252# "realm" => "download archiv",
253# "require" => "group=www|user=jan|host=192.168.2.10"
254# ),
37252fd1
ER
255# "/server-config" => (
256# "method" => "ldap",
257# "realm" => "server config",
258# "require" => "user=glen"
259# ),
7d62972e 260#)
40f84542 261
37252fd1 262
40f84542 263#### url handling modules (rewrite, redirect, access)
c799b856
ER
264#url.rewrite = (
265# "^/$" => "/server-status",
266#)
267#url.redirect = (
268# "^/wishlist/(.+)" => "http://www.123.org/$1",
269#)
dda0c1c2
ER
270
271# define a pattern for the host url finding
272# %% => % sign
273# %0 => domain name + tld
274# %1 => tld
275# %2 => domain name without tld
276# %3 => subdomain 1 name
277# %4 => subdomain 2 name
278#
7d62972e 279#evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
40f84542 280
9d396dc3 281#### expire module
7d62972e
ER
282#expire.url = (
283# "/buggy/" => "access 2 hours",
284# "/asdhas/" => "access plus 1 seconds 2 minutes",
285#)
dda0c1c2
ER
286
287#### ssi
7d62972e 288#ssi.extension = ( ".shtml" )
dda0c1c2
ER
289
290#### rrdtool
7d62972e
ER
291#rrdtool.binary = "/usr/bin/rrdtool"
292#rrdtool.db-name = "/var/www/lighttpd.rrd"
9d396dc3 293
0a50e972
ER
294#### setenv
295#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
296#setenv.add-response-header = ( "X-Secret-Message" => "42" )
297
5c1a52cc 298#### userdir module
7d62972e
ER
299#userdir.path = "public_html"
300#userdir.exclude-user = ( "root", "postmaster" )
5c1a52cc
MW
301#
302## if set, only users from this list may use the feature
7d62972e 303#userdir.include-user = ""
5c1a52cc
MW
304
305#### alias module
7d62972e 306#alias.url = (
7529b2c6 307# "/cgi-bin/" => "/usr/lib/cgi-bin",
7d62972e
ER
308#)
309
This page took 1.774587 seconds and 4 git commands to generate.