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