Ticket #402: aaa

File aaa, 10.2 kB (added by salnikov@…, 3 years ago)

lighttpd.conf

Line 
1# lighttpd configuration file
2#
3# use a it as base for lighttpd 1.0.0 and above
4#
5# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $
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
14server.modules              = (
15                               "mod_rewrite",
16#                               "mod_redirect",
17#                               "mod_alias",
18                                "mod_access",
19#                               "mod_auth",
20#                               "mod_status",
21#                               "mod_setenv",
22                               "mod_fastcgi",
23#                               "mod_proxy",
24                               "mod_simple_vhost",
25#                               "mod_evhost",
26#                               "mod_userdir",
27                               "mod_cgi",
28#                               "mod_compress",
29#                               "mod_ssi",
30#                               "mod_usertrack",
31#                               "mod_expire",
32#                               "mod_secdownload",
33#                               "mod_rrdtool",
34                                "mod_accesslog" )
35
36## a static document-root, for virtual-hosting take look at the
37## server.virtual-* options
38
39server.document-root        = "/usr/local/www/lighttpd/www/localhost/html/"
40
41## where to send error-messages to
42# server.errorlog             = "/usr/local/www/lighttpd/log/error.log"
43server.errorlog = "/dev/null"
44
45# files to check for if .../ is requested
46server.indexfiles           = ( "index.html",
47                                "index.htm" )
48
49# mimetype mapping
50mimetype.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"          =>      "application/ogg",
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",
97  ".bz2"          =>      "application/x-bzip",
98  ".tbz"          =>      "application/x-bzip-compressed-tar",
99  ".tar.bz2"      =>      "application/x-bzip-compressed-tar"
100 )
101
102# Use the "Content-Type" extended attribute to obtain mime type if possible
103#mimetypes.use-xattr        = "enable"
104
105
106## send a different Server: header
107## be nice and keep it at lighttpd
108server.tag                 = "lighttpd"
109
110#### accesslog module
111accesslog.filename          = "/usr/local/www/lighttpd/log/access.log"
112
113## deny access the file-extensions
114#
115# ~    is for backupfiles from vi, emacs, joe, ...
116# .inc is often used for code includes which should in general not be part
117#      of the document-root
118url.access-deny             = ( "~", ".inc" )
119
120
121
122######### Options that are good to be but not neccesary to be changed #######
123
124## bind to port (default: 80)
125#server.port                = 81
126
127## bind to localhost (default: all interfaces)
128#server.bind                = "grisu.home.kneschke.de"
129
130## error-handler for status 404
131#server.error-handler-404   = "/error-handler.html"
132#server.error-handler-404   = "/error-handler.php"
133
134## to help the rc.scripts
135#server.pid-file            = "/var/run/lighttpd.pid"
136
137
138###### virtual hosts
139##
140##  If you want name-based virtual hosting add the next three settings and load
141##  mod_simple_vhost
142##
143## document-root =
144##   virtual-server-root + virtual-server-default-host + virtual-server-docroot
145## or
146##   virtual-server-root + http-host + virtual-server-docroot
147##
148
149simple-vhost.server-root   = "/usr/local/www/lighttpd/www/"
150simple-vhost.default-host  = "www.best.com"
151simple-vhost.document-root = "/html/"
152
153
154##
155## Format: <errorfile-prefix><status-code>.html
156## -> ..../status-404.html for 'File not found'
157#server.errorfile-prefix    = "/home/weigon/projects/lighttpd/doc/status-"
158
159## virtual directory listings
160#server.dir-listing         = "enable"
161
162## enable debugging
163#debug.log-request-header   = "enable"
164#debug.log-response-header  = "enable"
165#debug.log-request-handling = "enable"
166#debug.log-file-not-found   = "enable"
167
168### only root can use these options
169#
170# chroot() to directory (default: no chroot() )
171#server.chroot              = "/"
172
173## change uid to <uid> (default: don't care)
174server.username            = "nobody"
175
176## change uid to <uid> (default: don't care)
177server.groupname           = "nobody"
178
179#### compress module
180#compress.cache-dir         = "/tmp/lighttpd/cache/compress/"
181#compress.filetype          = ("text/plain", "text/html")
182
183#### proxy module
184## read proxy.txt for more info
185#proxy.server               = ( ".php" =>
186#                               ( "localhost" =>
187#                                 (
188#                                   "host" => "192.168.0.101",
189#                                   "port" => 80
190#                                 )
191#                               )
192#                             )
193
194#### fastcgi module
195## read fastcgi.txt for more info
196
197$HTTP["host"] == "www.one.test.com" {
198
199fastcgi.server             = ( "" =>
200                               ( "localhost" =>
201                                 (
202                                   "check-local" => "disable",
203                                   "socket" => "/tmp/cgi-fastcgi.socket",
204                                   "bin-path" => "/home/user/bin/work",
205"min-procs" => 4,
206"max-procs" => 8,
207"max-load-per-proc" => 4
208                                 )
209                               )
210                            )
211
212}
213
214$HTTP["host"] == "one.test.com" {
215
216fastcgi.server             = ( "" =>
217                               ( "localhost" =>
218                                 (
219                                   "check-local" => "disable",
220                                   "socket" => "/tmp/cgi-fastcgi.socket",
221                                   "bin-path" => "/home/user/bin/work",
222"min-procs" => 4,
223"max-procs" => 8,
224"max-load-per-proc" => 4
225                                 )
226                               )
227                            )
228
229}
230
231#### CGI module
232
233$HTTP["host"] == "www.two.test.com" {
234cgi.assign                 = ( ".cgi" => "",
235                               ".pl" => "/usr/bin/perl",
236                               ".sh" => "/bin/sh" )
237}
238
239$HTTP["host"] == "two.test.com" {
240cgi.assign = ( ".cgi" => "",
241               ".pl" => "/usr/bin/perl",
242               ".sh" => "/bin/sh" )
243}
244
245#### SSL engine
246#ssl.engine                 = "enable"
247#ssl.pemfile                = "server.pem"
248
249#### status module
250#status.status-url          = "/server-status"
251#status.config-url          = "/server-config"
252
253#### auth module
254## read authentication.txt for more info
255#auth.backend               = "plain"
256#auth.backend.plain.userfile = "lighttpd.user"
257#auth.backend.plain.groupfile = "lighttpd.group"
258
259#auth.backend.ldap.hostname = "localhost"
260#auth.backend.ldap.base-dn  = "dc=my-domain,dc=com"
261#auth.backend.ldap.filter   = "(uid=$)"
262
263#auth.require               = ( "/server-status" =>
264#                               (
265#                                 "method"  => "digest",
266#                                 "realm"   => "download archiv",
267#                                 "require" => "group=www|user=jan|host=192.168.2.10"
268#                               ),
269#                               "/server-info" =>
270#                               (
271#                                 "method"  => "digest",
272#                                 "realm"   => "download archiv",
273#                                 "require" => "group=www|user=jan|host=192.168.2.10"
274#                               )
275#                             )
276
277#### url handling modules (rewrite, redirect, access)
278#url.rewrite                = ( "^/$"             => "/server-status" )
279#url.redirect               = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
280
281#
282# define a pattern for the host url finding
283# %% => % sign
284# %0 => domain name + tld
285# %1 => tld
286# %2 => domain name without tld
287# %3 => subdomain 1 name
288# %4 => subdomain 2 name
289#
290#evhost.path-pattern        = "/home/storage/dev/www/%3/htdocs/"
291
292#### expire module
293#expire.url                 = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
294
295#### ssi
296#ssi.extension              = ( ".shtml" )
297
298#### rrdtool
299#rrdtool.binary             = "/usr/bin/rrdtool"
300#rrdtool.db-name            = "/var/www/lighttpd.rrd"
301
302#### setenv
303#setenv.add-request-header  = ( "TRAV_ENV" => "mysql://user@host/db" )
304#setenv.add-response-header = ( "X-Secret-Message" => "42" )
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321