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