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