]>
Commit | Line | Data |
---|---|---|
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 | |
15 | server.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 | 41 | server.document-root = "/home/services/lighttpd/html/" |
40f84542 AM |
42 | |
43 | ## where to send error-messages to | |
7d62972e | 44 | server.errorlog = "/var/log/lighttpd/lighttpd.log" |
40f84542 AM |
45 | |
46 | # files to check for if .../ is requested | |
7d62972e ER |
47 | server.indexfiles = ( |
48 | "index.php", | |
49 | "index.html", | |
50 | "index.htm", | |
51 | "default.htm", | |
52 | ) | |
40f84542 AM |
53 | |
54 | # mimetype mapping | |
39902917 ER |
55 | # include, relative to dirname of main config file |
56 | include "mime.types.conf" | |
dda0c1c2 ER |
57 | |
58 | # Use the "Content-Type" extended attribute to obtain mime type if possible | |
7d62972e | 59 | #mimetype.use-xattr = "enable" |
2f595477 | 60 | |
0a50e972 ER |
61 | ## send a different Server: header |
62 | ## be nice and keep it at lighttpd | |
63 | #server.tag = "lighttpd" | |
64 | ||
40f84542 | 65 | #### accesslog module |
7d62972e | 66 | accesslog.filename = "/var/log/lighttpd/access.log" |
40f84542 AM |
67 | |
68 | ## deny access the file-extensions | |
69 | # | |
70 | # ~ is for backupfiles from vi, emacs, joe, ... | |
71 | # .inc is often used for code includes which should in general not be part | |
72 | # of the document-root | |
7d62972e | 73 | url.access-deny = ( "~", ".inc" ) |
40f84542 AM |
74 | |
75 | ######### Options that are good to be but not neccesary to be changed ####### | |
76 | ||
77 | ## bind to port (default: 80) | |
7d62972e | 78 | #server.port = 81 |
40f84542 AM |
79 | |
80 | ## bind to localhost (default: all interfaces) | |
7d62972e | 81 | #server.bind = "grisu.home.kneschke.de" |
40f84542 | 82 | |
dda0c1c2 | 83 | ## error-handler for status 404 |
7d62972e ER |
84 | #server.error-handler-404 = "/error-handler.html" |
85 | #server.error-handler-404 = "/error-handler.php" | |
dda0c1c2 ER |
86 | |
87 | ## to help the rc.scripts | |
7d62972e | 88 | #server.pid-file = "/var/run/lighttpd.pid" |
40f84542 AM |
89 | |
90 | ###### virtual hosts | |
91 | ## | |
92 | ## If you want name-based virtual hosting add the next three settings and load | |
93 | ## mod_simple_vhost | |
94 | ## | |
95 | ## document-root = | |
96 | ## virtual-server-root + virtual-server-default-host + virtual-server-docroot or | |
97 | ## virtual-server-root + http-host + virtual-server-docroot | |
98 | ## | |
99 | #simple-vhost.server-root = "/home/weigon/wwwroot/servers/" | |
100 | #simple-vhost.default-host = "grisu.home.kneschke.de" | |
101 | #simple-vhost.document-root = "/pages/" | |
102 | ||
103 | ||
7d62972e | 104 | ## |
ef2634ff | 105 | ## Format: <errorfile-prefix><status-code>.html |
40f84542 | 106 | ## -> ..../status-404.html for 'File not found' |
7d62972e | 107 | #server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-" |
40f84542 AM |
108 | |
109 | ## virtual directory listings | |
110 | #server.dir-listing = "enable" | |
111 | ||
ae08eb54 ER |
112 | ## enable debugging |
113 | #debug.log-request-header = "enable" | |
114 | #debug.log-response-header = "enable" | |
115 | #debug.log-request-handling = "enable" | |
116 | #debug.log-file-not-found = "enable" | |
117 | ||
40f84542 AM |
118 | ### only root can use these options |
119 | # | |
120 | # chroot() to directory (default: no chroot() ) | |
121 | #server.chroot = "/" | |
122 | ||
123 | ## change uid to <uid> (default: don't care) | |
a2a346d6 | 124 | server.username = "lighttpd" |
40f84542 AM |
125 | |
126 | ## change uid to <uid> (default: don't care) | |
a2a346d6 | 127 | server.groupname = "lighttpd" |
40f84542 AM |
128 | |
129 | #### compress module | |
130 | #compress.cache-dir = "/tmp/lighttpd/cache/compress/" | |
131 | #compress.filetype = ("text/plain", "text/html") | |
132 | ||
0a50e972 ER |
133 | #### proxy module |
134 | ## read proxy.txt for more info | |
135 | #proxy.server = ( | |
136 | # ".php" => ( | |
137 | # "localhost" => ( | |
138 | # "host" => "192.168.0.101", | |
139 | # "port" => 80, | |
140 | # ) | |
141 | # ) | |
142 | #) | |
143 | ||
40f84542 | 144 | #### fastcgi module |
dda0c1c2 | 145 | ## read fastcgi.txt for more info |
c799b856 | 146 | #fastcgi.debug = 1 |
7d62972e ER |
147 | #fastcgi.server = ( |
148 | # ".php" => ( | |
149 | # "localhost" => ( | |
150 | # "socket" => "/var/run/php/php-fastcgi.sock", | |
151 | # "bin-path" => "/usr/bin/php.fcgi", | |
152 | # ) | |
153 | # ) | |
154 | #) | |
155 | ||
40f84542 AM |
156 | |
157 | #### CGI module | |
7d62972e ER |
158 | #cgi.assign = ( |
159 | # ".pl" => "/usr/bin/perl", | |
160 | # ".cgi" => "/usr/bin/perl", | |
161 | #) | |
40f84542 AM |
162 | |
163 | #### SSL engine | |
7d62972e ER |
164 | #ssl.engine = "enable" |
165 | #ssl.pemfile = "server.pem" | |
40f84542 AM |
166 | |
167 | #### status module | |
7d62972e ER |
168 | #status.status-url = "/server-status" |
169 | #status.config-url = "/server-config" | |
40f84542 AM |
170 | |
171 | #### auth module | |
dda0c1c2 | 172 | ## read authentification.txt for more info |
37252fd1 ER |
173 | ## debugging |
174 | # 0 for off, 1 for 'auth-ok' messages, 2 for verbose debugging | |
175 | #auth.debug = 1 | |
176 | ## type of backend | |
177 | # plain, htpasswd, ldap or htdigest | |
178 | #auth.backend = "plain" | |
179 | # filename of the password storage | |
180 | ## for plain | |
181 | #auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user" | |
182 | #auth.backend.plain.groupfile = "/etc/lighttpd/lighttpd.group" | |
183 | ## for htpasswd | |
184 | #auth.backend.htpasswd.userfile = "/etc/lighttpd/lighttpd-htpasswd.user" | |
185 | ## for htdigest | |
186 | #auth.backend.htdigest.userfile = "/etc/lighttpd/lighttpd-htdigest.user" | |
187 | ## for ldap | |
188 | # the $ in auth.backend.ldap.filter is replaced by the | |
189 | # 'username' from the login dialog | |
7d62972e ER |
190 | #auth.backend.ldap.hostname = "localhost" |
191 | #auth.backend.ldap.base-dn = "dc=my-domain,dc=com" | |
192 | #auth.backend.ldap.filter = "(uid=$)" | |
193 | ||
194 | #auth.require = ( | |
195 | # "/server-status" => ( | |
196 | # "method" => "digest", | |
197 | # "realm" => "download archiv", | |
37252fd1 | 198 | # "require" => "user=agent007|user=agent008" |
7d62972e ER |
199 | # ), |
200 | # "/server-info" => ( | |
201 | # "method" => "digest", | |
202 | # "realm" => "download archiv", | |
203 | # "require" => "group=www|user=jan|host=192.168.2.10" | |
204 | # ), | |
37252fd1 ER |
205 | # "/server-config" => ( |
206 | # "method" => "ldap", | |
207 | # "realm" => "server config", | |
208 | # "require" => "user=glen" | |
209 | # ), | |
7d62972e | 210 | #) |
40f84542 | 211 | |
37252fd1 | 212 | |
40f84542 | 213 | #### url handling modules (rewrite, redirect, access) |
c799b856 ER |
214 | #url.rewrite = ( |
215 | # "^/$" => "/server-status", | |
216 | #) | |
217 | #url.redirect = ( | |
218 | # "^/wishlist/(.+)" => "http://www.123.org/$1", | |
219 | #) | |
dda0c1c2 ER |
220 | |
221 | # define a pattern for the host url finding | |
222 | # %% => % sign | |
223 | # %0 => domain name + tld | |
224 | # %1 => tld | |
225 | # %2 => domain name without tld | |
226 | # %3 => subdomain 1 name | |
227 | # %4 => subdomain 2 name | |
228 | # | |
7d62972e | 229 | #evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/" |
40f84542 | 230 | |
9d396dc3 | 231 | #### expire module |
7d62972e ER |
232 | #expire.url = ( |
233 | # "/buggy/" => "access 2 hours", | |
234 | # "/asdhas/" => "access plus 1 seconds 2 minutes", | |
235 | #) | |
dda0c1c2 ER |
236 | |
237 | #### ssi | |
7d62972e | 238 | #ssi.extension = ( ".shtml" ) |
dda0c1c2 ER |
239 | |
240 | #### rrdtool | |
7d62972e ER |
241 | #rrdtool.binary = "/usr/bin/rrdtool" |
242 | #rrdtool.db-name = "/var/www/lighttpd.rrd" | |
9d396dc3 | 243 | |
0a50e972 ER |
244 | #### setenv |
245 | #setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" ) | |
246 | #setenv.add-response-header = ( "X-Secret-Message" => "42" ) | |
247 | ||
5c1a52cc | 248 | #### userdir module |
7d62972e ER |
249 | #userdir.path = "public_html" |
250 | #userdir.exclude-user = ( "root", "postmaster" ) | |
5c1a52cc MW |
251 | # |
252 | ## if set, only users from this list may use the feature | |
7d62972e | 253 | #userdir.include-user = "" |
5c1a52cc MW |
254 | |
255 | #### alias module | |
7d62972e | 256 | #alias.url = ( |
7529b2c6 | 257 | # "/cgi-bin/" => "/usr/lib/cgi-bin", |
7d62972e ER |
258 | #) |
259 |