[packages] remove 'svn:keywords' property on /packages as well, not needed anymore...
[openwrt/svn-archive/archive.git] / net / lighttpd / files / lighttpd.conf
1 # lighttpd configuration file
2 #
3 ## modules to load
4 # all other module should only be loaded if really neccesary
5 # - saves some time
6 # - saves memory
7 #server.modules = (
8 # "mod_rewrite",
9 # "mod_redirect",
10 # "mod_alias",
11 # "mod_auth",
12 # "mod_status",
13 # "mod_setenv",
14 # "mod_fastcgi",
15 # "mod_proxy",
16 # "mod_simple_vhost",
17 # "mod_cgi",
18 # "mod_ssi",
19 # "mod_usertrack",
20 # "mod_expire"
21 #)
22
23 # force use of the "write" backend (closes: #2401)
24 server.network-backend = "write"
25
26 ## a static document-root, for virtual-hosting take look at the
27 ## server.virtual-* options
28 server.document-root = "/www/"
29
30 ## where to send error-messages to
31 #server.errorlog = "/var/log/lighttpd/error.log"
32
33 ## files to check for if .../ is requested
34 index-file.names = ( "index.html", "default.html", "index.htm", "default.htm" )
35
36 ## mimetype mapping
37 mimetype.assign = (
38 ".pdf" => "application/pdf",
39 ".class" => "application/octet-stream",
40 ".pac" => "application/x-ns-proxy-autoconfig",
41 ".swf" => "application/x-shockwave-flash",
42 ".wav" => "audio/x-wav",
43 ".gif" => "image/gif",
44 ".jpg" => "image/jpeg",
45 ".jpeg" => "image/jpeg",
46 ".png" => "image/png",
47 ".css" => "text/css",
48 ".html" => "text/html",
49 ".htm" => "text/html",
50 ".js" => "text/javascript",
51 ".txt" => "text/plain",
52 ".dtd" => "text/xml",
53 ".xml" => "text/xml"
54 )
55
56 ## Use the "Content-Type" extended attribute to obtain mime type if possible
57 #mimetypes.use-xattr = "enable"
58
59 ## send a different Server: header
60 ## be nice and keep it at lighttpd
61 #server.tag = "lighttpd"
62
63 $HTTP["url"] =~ "\.pdf$" {
64 server.range-requests = "disable"
65 }
66
67 ##
68 # which extensions should not be handle via static-file transfer
69 #
70 # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
71 static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
72
73 ######### Options that are good to be but not neccesary to be changed #######
74
75 ## bind to port (default: 80)
76 #server.port = 81
77
78 ## bind to localhost (default: all interfaces)
79 #server.bind = "localhost"
80
81 ## error-handler for status 404
82 #server.error-handler-404 = "/error-handler.html"
83 #server.error-handler-404 = "/error-handler.php"
84
85 ## to help the rc.scripts
86 server.pid-file = "/var/run/lighttpd.pid"
87
88
89 ###### virtual hosts
90 ##
91 ## If you want name-based virtual hosting add the next three settings and load
92 ## mod_simple_vhost
93 ##
94 ## document-root =
95 ## virtual-server-root + virtual-server-default-host + virtual-server-docroot or
96 ## virtual-server-root + http-host + virtual-server-docroot
97 ##
98 #simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
99 #simple-vhost.default-host = "grisu.home.kneschke.de"
100 #simple-vhost.document-root = "/pages/"
101
102
103 ##
104 ## Format: <errorfile-prefix><status>.html
105 ## -> ..../status-404.html for 'File not found'
106 #server.errorfile-prefix = "/www/error-"
107
108 ## virtual directory listings
109 #server.dir-listing = "enable"
110
111 ## send unhandled HTTP-header headers to error-log
112 #debug.dump-unknown-headers = "enable"
113
114 ### only root can use these options
115 #
116 # chroot() to directory (default: no chroot() )
117 #server.chroot = "/"
118
119 ## change uid to <uid> (default: don't care)
120 #server.username = "nobody"
121 #
122 server.upload-dirs = ( "/tmp" )
123
124 ## change uid to <uid> (default: don't care)
125 #server.groupname = "nobody"
126
127 #### compress module
128 #compress.cache-dir = "/dev/null/"
129 #compress.filetype = ("text/plain", "text/html")
130
131 #### proxy module
132 ## read proxy.txt for more info
133 #proxy.server = (
134 # ".php" => (
135 # "localhost" => (
136 # "host" => "192.168.0.101",
137 # "port" => 80
138 # )
139 # )
140 #)
141
142 #### fastcgi module
143 ## read fastcgi.txt for more info
144 #fastcgi.server = (
145 # ".php" => (
146 # "localhost" => (
147 # "socket" => "/tmp/php-fastcgi.socket",
148 # "bin-path" => "/usr/local/bin/php"
149 # )
150 # )
151 #)
152
153 #### CGI module
154 #cgi.assign = ( ".pl" => "/usr/bin/perl", ".cgi" => "/usr/bin/perl" )
155
156 #### SSL engine
157 #ssl.engine = "enable"
158 #ssl.pemfile = "server.pem"
159
160 #### status module
161 #status.status-url = "/server-status"
162 #status.config-url = "/server-config"
163
164 #### auth module
165 ## read authentification.txt for more info
166 #auth.backend = "plain"
167 #auth.backend.plain.userfile = "lighttpd.user"
168 #auth.backend.plain.groupfile = "lighttpd.group"
169 #auth.require = (
170 # "/server-status" => (
171 # "method" => "digest",
172 # "realm" => "download archiv",
173 # "require" => "group=www|user=jan|host=192.168.2.10"
174 # ),
175 # "/server-info" => (
176 # "method" => "digest",
177 # "realm" => "download archiv",
178 # "require" => "group=www|user=jan|host=192.168.2.10"
179 # )
180 #)
181
182 #### url handling modules (rewrite, redirect, access)
183 #url.rewrite = ( "^/$" => "/server-status" )
184 #url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
185
186 #### both rewrite/redirect support back reference to regex conditional using %n
187 #$HTTP["host"] =~ "^www\.(.*)" {
188 # url.redirect = ( "^/(.*)" => "http://%1/$1" )
189 #}
190
191 #### expire module
192 #expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
193
194 #### ssi
195 #ssi.extension = ( ".shtml" )
196
197 #### setenv
198 #setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
199 #setenv.add-response-header = ( "X-Secret-Message" => "42" )
200
201 #### variable usage:
202 ## variable name without "." is auto prefixed by "var." and becomes "var.bar"
203 #bar = 1
204 #var.mystring = "foo"
205
206 ## integer add
207 #bar += 1
208 ## string concat, with integer cast as string, result: "www.foo1.com"
209 #server.name = "www." + mystring + var.bar + ".com"
210 ## array merge
211 #index-file.names = (foo + ".php") + index-file.names
212 #index-file.names += (foo + ".php")
213
214 #### include
215 #include /etc/lighttpd/lighttpd-inc.conf
216 ## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
217 #include "lighttpd-inc.conf"
218
219 #### include_shell
220 #include_shell "echo var.a=1"
221 ## the above is same as:
222 #var.a=1