summaryrefslogtreecommitdiff
path: root/openwrt/lighttpd.conf
blob: 42d2f76908fc237b16b12ad98a5a8e8d6bdba70a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# lighttpd configuration file
# 
# use a it as base for lighttpd 1.0.0 and above
#
# $Id: lighttpd.conf,v 1.6 2004/08/29 09:44:53 weigon Exp $

############ Options you really have to take care of ####################

## modules to load
# at least mod_access and mod_accesslog should be loaded
# all other module should only be loaded if really neccesary
# - saves some time
# - saves memory
server.modules              = ( 
#                               "mod_rewrite", 
#                               "mod_redirect", 
			        "mod_access", 
#				"mod_auth", 
#                               "mod_status", 
#				"mod_fastcgi",
#				"mod_simple_vhost",
#				"mod_evhost",
#				"mod_cgi",
#				"mod_compress",
#                               "mod_ssi",
#                               "mod_usertrack",
# 				"mod_rrdtool",
#				"mod_accesslog" 
)

## a static document-root, for virtual-hosting take look at the 
## server.virtual-* options
server.document-root             = "/www/"

## where to send error-messages to
# server.errorlog            = ""

# files to check for if .../ is requested
server.indexfiles          = ( "index.php", "index.html", 
                                "index.htm", "default.htm" )

# mimetype mapping
mimetype.assign            = (  
  ".pdf"          =>      "application/pdf",
  ".sig"          =>      "application/pgp-signature",
  ".spl"          =>      "application/futuresplash",
  ".class"        =>      "application/octet-stream",
  ".ps"           =>      "application/postscript",
  ".torrent"      =>      "application/x-bittorrent",
  ".dvi"          =>      "application/x-dvi",
  ".gz"           =>      "application/x-gzip",
  ".pac"          =>      "application/x-ns-proxy-autoconfig",
  ".swf"          =>      "application/x-shockwave-flash",
  ".tar.gz"       =>      "application/x-tgz",
  ".tgz"          =>      "application/x-tgz",
  ".tar"          =>      "application/x-tar",
  ".zip"          =>      "application/zip",
  ".mp3"          =>      "audio/mpeg",
  ".m3u"          =>      "audio/x-mpegurl",
  ".wma"          =>      "audio/x-ms-wma",
  ".wax"          =>      "audio/x-ms-wax",
  ".ogg"          =>      "audio/x-wav",
  ".wav"          =>      "audio/x-wav",
  ".gif"          =>      "image/gif",
  ".jpg"          =>      "image/jpeg",
  ".jpeg"         =>      "image/jpeg",
  ".png"          =>      "image/png",
  ".xbm"          =>      "image/x-xbitmap",
  ".xpm"          =>      "image/x-xpixmap",
  ".xwd"          =>      "image/x-xwindowdump",
  ".css"          =>      "text/css",
  ".html"         =>      "text/html",
  ".htm"          =>      "text/html",
  ".js"           =>      "text/javascript",
  ".asc"          =>      "text/plain",
  ".c"            =>      "text/plain",
  ".conf"         =>      "text/plain",
  ".text"         =>      "text/plain",
  ".txt"          =>      "text/plain",
  ".dtd"          =>      "text/xml",
  ".xml"          =>      "text/xml",
  ".mpeg"         =>      "video/mpeg",
  ".mpg"          =>      "video/mpeg",
  ".mov"          =>      "video/quicktime",
  ".qt"           =>      "video/quicktime",
  ".avi"          =>      "video/x-msvideo",
  ".asf"          =>      "video/x-ms-asf",
  ".asx"          =>      "video/x-ms-asf",
  ".wmv"          =>      "video/x-ms-wmv"
 )

# Use the "Content-Type" extended attribute to obtain mime type if possible
# mimetypes.use-xattr = "enable"

#### accesslog module
# accesslog.filename          = "/www/logs/access.log"

## deny access the file-extensions
#
# ~    is for backupfiles from vi, emacs, joe, ...
# .inc is often used for code includes which should in general not be part
#      of the document-root
url.access-deny             = ( "~", ".inc" )



######### Options that are good to be but not neccesary to be changed #######

## bind to port (default: 80)
#server.port                = 81

## bind to localhost (default: all interfaces)
#server.bind                = "grisu.home.kneschke.de"

## error-handler for status 404
#server.error-handler-404   = "/error-handler.html"
#server.error-handler-404   = "/error-handler.php"


###### virtual hosts
##
##   If you want name-based virtual hosting add the next three settings and load
##   mod_simple_vhost
##
## document-root =
##   virtual-server-root + virtual-server-default-host + virtual-server-docroot or
##   virtual-server-root + http-host + virtual-server-docroot
##
#simple-vhost.server-root         = "/home/weigon/wwwroot/servers/"
#simple-vhost.default-host        = "grisu.home.kneschke.de"
#simple-vhost.document-root       = "/pages/"


## 
## Format: <errorfile-prefix><status>.html
## -> ..../status-404.html for 'File not found'
#server.errorfile-prefix    = "/home/weigon/projects/lighttpd/doc/status-"

## virtual directory listings
#server.dir-listing          = "enable"

## send unhandled HTTP-header headers to error-log
#debug.dump-unknown-headers  = "enable"

### only root can use these options
#
# chroot() to directory (default: no chroot() )
#server.chroot            = "/"

## change uid to <uid> (default: don't care)
#server.username            = "wwwrun"

## change uid to <uid> (default: don't care)
#server.groupname           = "wwwrun"

#### compress module
#compress.cache-dir          = "/tmp/lighttpd/cache/compress/"
#compress.filetype           = ("text/plain", "text/html")

#### fastcgi module
## read fastcgi.txt for more info
#fastcgi.server              = ( ".php" =>
#				( "grisu" => 
#				  ( 
#				    "host" => "192.168.2.10",
#				    "port" => 1026
#				  )
#				)
#			      )

#### CGI module
#cgi.assign                  = ( ".pl"  => "/usr/bin/perl",
#                                ".cgi" => "/usr/bin/perl" )
#

#### SSL engine
#ssl.engine                  = "enable"
#ssl.pemfile                 = "server.pem"

#### status module
# status.status-url = "/server-status"
# status.config-url = "/server-config"

#### auth module
## read authentification.txt for more info
# auth.backend                = "plain"
# auth.backend.plain.userfile = "lighttpd.user"
# auth.backend.plain.groupfile = "lighttpd.group"

# auth.backend.ldap.hostname = "localhost"
# auth.backend.ldap.base-dn  = "dc=my-domain,dc=com"
# auth.backend.ldap.filter   = "(uid=$)"

# auth.require                = ( "/server-status" => 
#                                ( 
#				  "method"  => "digest",
#				  "realm"   => "download archiv",
#				  "require" => "group=www|user=jan|host=192.168.2.10"
#				),
#				"/server-info" => 
#                                ( 
#				  "method"  => "digest",
#				  "realm"   => "download archiv",
#				  "require" => "group=www|user=jan|host=192.168.2.10"
#				)
#                              )

#### url handling modules (rewrite, redirect, access)
# url.rewrite                 = ( "^/$"             => "/server-status" )
# url.redirect                = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )

#
# define a pattern for the host url finding
# %% => % sign
# %0 => domain name + tld
# %1 => tld
# %2 => domain name without tld
# %3 => subdomain 1 name
# %4 => subdomain 2 name
#
# evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"

#### expire module
# expire.url                  = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")

#### ssi
# ssi.extension              = ( ".shtml" )

#### rrdtool
# rrdtool.binary = "/usr/bin/rrdtool"
# rrdtool.db-name = "/var/www/lighttpd.rrd"