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