]> git.pld-linux.org Git - packages/lighttpd.git/blob - lighttpd.conf
- added Traffic Shaping configuration
[packages/lighttpd.git] / lighttpd.conf
1 # lighttpd configuration file
2 #
3 # use a it as base for lighttpd 1.4 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
15 server.modules = (
16         "mod_access",
17         "mod_accesslog",
18 #       "mod_alias",
19 #       "mod_auth",
20 #       "mod_cgi",
21 #       "mod_cml",
22 #       "mod_compress",
23 #       "mod_evasive"
24 #       "mod_evhost",
25 #       "mod_expire",
26 #       "mod_fastcgi",
27 #       "mod_localizer",
28 #       "mod_proxy",
29 #       "mod_redirect",
30 #       "mod_rewrite",
31 #       "mod_rrdtool",
32 #       "mod_secdownload",
33 #       "mod_setenv",
34 #       "mod_simple_vhost",
35 #       "mod_ssi",
36 #       "mod_status",
37 #       "mod_trigger_b4_dl",
38 #       "mod_userdir",
39 #       "mod_usertrack",
40 )
41
42 ## a static document-root, for virtual-hosting take look at the
43 ## server.virtual-* options
44 server.document-root = "/home/services/lighttpd/html/"
45
46 ## where to send error-messages to
47 server.errorlog = "/var/log/lighttpd/lighttpd.log"
48 server.pid-file = "/var/run/lighttpd.pid"
49
50 # files to check for if .../ is requested
51 server.indexfiles = (
52         "index.php",
53         "index.html",
54         "index.htm",
55         "default.htm",
56 )
57
58 ## set the event-handler (read the performance section in the manual)
59 # Linux 2.4+   rt-signals linux-rtsig
60 # Linux 2.6+   epoll   linux-sysepoll
61 #server.event-handler = "linux-sysepoll"
62
63 # mimetype mapping
64 # include, relative to dirname of main config file
65 include "mime.types.conf"
66
67 # Use the "Content-Type" extended attribute to obtain mime type if possible
68 #mimetype.use-xattr = "enable"
69
70 ## send a different Server: header
71 ## be nice and keep it at lighttpd
72 #server.tag = "lighttpd"
73
74 #### accesslog module
75 accesslog.filename = "/var/log/lighttpd/access.log"
76
77 ## deny access the file-extensions
78 #
79 # ~    is for backupfiles from vi, emacs, joe, ...
80 # .inc is often used for code includes which should in general not be part
81 #      of the document-root
82 url.access-deny = ( "~", ".inc" )
83
84 $HTTP["url"] =~ "\.pdf$" {
85         server.range-requests = "disable"
86 }
87
88 ##
89 # which extensions should not be handle via static-file transfer
90 #
91 # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
92 static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
93
94 ######### Options that are good to be but not neccesary to be changed #######
95
96 ## bind to port (default: 80)
97 #server.port = 81
98
99 ## bind to localhost (default: all interfaces)
100 #server.bind = "grisu.home.kneschke.de"
101
102 ## error-handler for status 404
103 #server.error-handler-404 = "/error-handler.html"
104 #server.error-handler-404 = "/error-handler.php"
105
106 ###### virtual hosts
107 ##
108 ##   If you want name-based virtual hosting add the next three settings and load
109 ##   mod_simple_vhost
110 ##
111 ## document-root =
112 ##   virtual-server-root + virtual-server-default-host + virtual-server-docroot
113 ## or
114 ##   virtual-server-root + http-host + virtual-server-docroot
115 ##
116 #simple-vhost.server-root         = "/home/weigon/wwwroot/servers/"
117 #simple-vhost.default-host        = "grisu.home.kneschke.de"
118 #simple-vhost.document-root       = "/pages/"
119
120
121 ##
122 ## Format: <errorfile-prefix><status-code>.html
123 ## -> ..../status-404.html for 'File not found'
124 #server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"
125
126 ## virtual directory listings
127 #server.dir-listing          = "enable"
128
129 ## enable debugging
130 #debug.log-request-header    = "enable"
131 #debug.log-response-header   = "enable"
132 #debug.log-request-handling  = "enable"
133 #debug.log-file-not-found    = "enable"
134
135 ### only root can use these options
136 #
137 # chroot() to directory (default: no chroot() )
138 #server.chroot            = "/"
139
140 ## change uid to <uid> (default: don't care)
141 server.username            = "lighttpd"
142
143 ## change uid to <uid> (default: don't care)
144 server.groupname           = "lighttpd"
145
146 # Traffic Shaping
147 #
148 #connection.kbytes-per-second = 32
149 #server.kbytes-per-second = 128
150
151 #### compress module
152 #compress.cache-dir          = "/tmp/lighttpd/cache/compress/"
153 #compress.filetype           = ("text/plain", "text/html")
154
155 #### proxy module
156 ## read proxy.txt for more info
157 #proxy.server = (
158 #       ".php" => (
159 #               "localhost" => (
160 #                       "host" => "192.168.0.101",
161 #                       "port" => 80,
162 #               )
163 #       )
164 #)
165
166 include_shell "/bin/cat webapps.d/*.conf"
167
168 #### fastcgi module
169 ## read fastcgi.txt for more info
170 #fastcgi.debug = 1
171 #fastcgi.server = (
172 #       ".php" => (
173 #               "localhost" => (
174 #                       "socket" => "/var/run/php/php-fastcgi.sock",
175 #                       "bin-path" => "/usr/bin/php.fcgi",
176 #               )
177 #       )
178 #)
179
180 #### standalone of php-fcgi
181 # if you want to use standalone version of php.fcgi
182 # install php-fcgi-init , start php-fcgi and then start lighttpd
183 #
184 #fastcgi.server = ( 
185 #       ".php" => (
186 #               ( "host" => "127.0.0.1",
187 #                 "port" => 1026,
188 #               )
189 #       )
190 #)
191
192
193
194 #### CGI module
195 #cgi.assign = (
196 #       ".pl"  => "/usr/bin/perl",
197 #       ".cgi" => "/usr/bin/perl",
198 #)
199
200 #### SSL engine
201 #ssl.engine = "enable"
202 #ssl.pemfile = "server.pem"
203
204 #### status module
205 #status.status-url = "/server-status"
206 #status.config-url = "/server-config"
207 #status.statistics-url = "/server-stats"
208
209 #### auth module
210 ## read authentication.txt for more info
211 ## debugging
212 # 0 for off, 1 for 'auth-ok' messages, 2 for verbose debugging
213 #auth.debug = 1
214 ## type of backend
215 # plain, htpasswd, ldap or htdigest
216 #auth.backend = "plain"
217 # filename of the password storage
218 ## for plain
219 #auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user"
220 #auth.backend.plain.groupfile = "/etc/lighttpd/lighttpd.group"
221 ## for htpasswd
222 #auth.backend.htpasswd.userfile = "/etc/lighttpd/lighttpd-htpasswd.user"
223 ## for htdigest
224 #auth.backend.htdigest.userfile = "/etc/lighttpd/lighttpd-htdigest.user"
225 ## for ldap
226 # the $ in auth.backend.ldap.filter is replaced by the
227 # 'username' from the login dialog
228 #auth.backend.ldap.hostname = "localhost"
229 #auth.backend.ldap.base-dn  = "dc=my-domain,dc=com"
230 #auth.backend.ldap.filter   = "(uid=$)"
231
232 #auth.require = (
233 #       "/server-status" => (
234 #               "method"  => "digest",
235 #               "realm"   => "download archiv",
236 #               "require" => "user=jan"
237 #       ),
238 #       "/server-info" => (
239 #               "method"  => "digest",
240 #               "realm"   => "download archiv",
241 #               "require" => "valid-user"
242 #       )
243 #)
244
245 #### url handling modules (rewrite, redirect, access)
246 #url.rewrite = (
247 #       "^/$" => "/server-status",
248 #)
249 #url.redirect = (
250 #       "^/wishlist/(.+)" => "http://www.123.org/$1",
251 #)
252 #### both rewrite/redirect support back reference to regex conditional using %n
253 #$HTTP["host"] =~ "^www\.(.*)" {
254 #       url.redirect = ( "^/(.*)" => "http://%1/$1" )
255 #}
256
257 # define a pattern for the host url finding
258 # %% => % sign
259 # %0 => domain name + tld
260 # %1 => tld
261 # %2 => domain name without tld
262 # %3 => subdomain 1 name
263 # %4 => subdomain 2 name
264 #
265 #evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
266
267 #### expire module
268 #expire.url = (
269 #       "/buggy/" => "access 2 hours",
270 #       "/asdhas/" => "access plus 1 seconds 2 minutes",
271 #)
272
273 #### evasive module
274 ##
275 ## Limits number of connections per IP
276 ##
277 #evasive.max-conns-per-ip = 5
278
279 #### ssi
280 #ssi.extension = ( ".shtml" )
281
282 #### rrdtool
283 #rrdtool.binary = "/usr/bin/rrdtool"
284 #rrdtool.db-name = "/var/www/lighttpd.rrd"
285
286 #### setenv
287 #setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
288 #setenv.add-response-header = ( "X-Secret-Message" => "42" )
289
290 ## for mod_trigger_b4_dl
291 # trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
292 # trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
293 # trigger-before-download.trigger-url = "^/trigger/"
294 # trigger-before-download.download-url = "^/download/"
295 # trigger-before-download.deny-url = "http://127.0.0.1/index.html"
296 # trigger-before-download.trigger-timeout = 10
297
298 ## for mod_cml
299 ## don't forget to add index.cml to server.indexfiles
300 # cml.extension               = ".cml"
301 # cml.memcache-hosts          = ( "127.0.0.1:11211" )
302
303 #### variable usage:
304 ## variable name without "." is auto prefixed by "var." and becomes "var.bar"
305 #bar = 1
306 #var.mystring = "foo"
307
308 ## integer add
309 #bar += 1
310 ## string concat, with integer cast as string, result: "www.foo1.com"
311 #server.name = "www." + mystring + var.bar + ".com"
312 ## array merge
313 #index-file.names = (foo + ".php") + index-file.names
314 #index-file.names += (foo + ".php")
315
316 #### include
317 #include /etc/lighttpd/lighttpd-inc.conf
318 ## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
319 #include "lighttpd-inc.conf"
320
321 #### include_shell
322 #include_shell "echo var.a=1"
323 ## the above is same as:
324 #var.a=1
325
326 #### userdir module
327 #userdir.path = "public_html"
328 #userdir.exclude-user = ( "root", "postmaster" )
329 #
330 ## if set, only users from this list may use the feature
331 #userdir.include-user = ""
332
333 #### alias module
334 #alias.url = (
335 #       "/cgi-bin/" => "/usr/lib/cgi-bin",
336 #)
337
This page took 0.080506 seconds and 4 git commands to generate.