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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
|
###################################
# Default lighttpd.conf for Adélie
###################################
######## Variables ########
var.basedir = "/var/www/localhost"
var.logdir = "/var/log/lighttpd"
var.statedir = "/var/lib/lighttpd"
######## Modules ########
# NOTE: the order of modules is important.
server.modules = (
# "mod_rewrite",
# "mod_redirect",
# "mod_alias",
"mod_access",
# "mod_cml",
# "mod_trigger_b4_dl",
# "mod_auth",
# "mod_status",
"mod_setenv",
# "mod_proxy",
# "mod_simple_vhost",
# "mod_evhost",
# "mod_userdir",
"mod_compress",
# "mod_ssi",
# "mod_usertrack",
"mod_expire",
# "mod_secdownload",
# "mod_rrdtool",
# "mod_webdav",
"mod_accesslog",
# "mod_openssl" # You need this if you want TLS!
)
######## Inclusions ########
include "mime-types.conf"
# uncomment for cgi support
# include "mod_cgi.conf"
# uncomment for php/fastcgi support
# include "mod_fastcgi.conf"
# uncomment for php/fastcgi fpm support
# include "mod_fastcgi_fpm.conf"
######## Global Settings ########
server.username = "lighttpd"
server.groupname = "lighttpd"
server.document-root = var.basedir + "/htdocs"
server.pid-file = "/run/lighttpd.pid"
server.errorlog = var.logdir + "/error.log"
# To log errors to syslog instead, use:
# server.errorlog-use-syslog = "enable"
server.indexfiles = ("index.html", "index.htm", "default.htm")
# server.tag = "lighttpd"
server.follow-symlink = "enable"
server.event-handler = "linux-sysepoll"
# To chroot to a directory:
# server.chroot = "/"
# Default bind port is 80. To change:
# server.port = 81
# Default bind address is global (0.0.0.0). To change:
# server.bind = "grisu.home.kneschke.de"
# error-handler for status 404
# server.error-handler-404 = "/error-handler.html"
# Format: <errorfile-prefix><status-code>.html
# -> ..../status-404.html for 'File not found'
# server.errorfile-prefix = var.basedir + "/error/status-"
# FAM support for caching stat() calls
server.stat-cache-engine = "fam"
# which extensions should not be handled via static-file transfer
# (extensions that are usually handled by mod_cgi, mod_fastcgi, etc).
static-file.exclude-extensions = (".php", ".pl", ".cgi", ".fcgi")
######## mod_accesslog config ########
accesslog.filename = var.logdir + "/access.log"
######## mod_dirlisting config ########
# Enable directory listings if no indexfile is present.
#dir-listing.activate = "enable"
# Don't list hidden files/directories (beginning with '.')
#dir-listing.hide-dotfiles = "enable"
#
# Specify a path here for custom directory listing CSS:
#dir-listing.external-css = "/path/to/dir-listing.css"
#
# Exclude files that match any regex in this list from directory listings:
#dir-listing.exclude = ("^\.", "~$")
######## mod_access config ########
# See access.txt in lighttpd-doc package for more info.
url.access-deny = ("~", ".inc")
######## mod_userdir config ########
# This will give all users with valid homedirs the chance to publish a
# webpage from this server using traditional /~username/ paths.
# See userdir.txt in lighttpd-doc package for more info.
#
#userdir.path = "public_html"
#userdir.exclude-user = ("root")
######## mod_ssi config ########
# This allows you to use server-side includes.
#ssi.extension = (".shtml")
######## SSL config ########
# See ssl.txt in lighttpd-doc package for more info.
# The defaults here are NOT the server defaults. You need to uncomment
# them to use them. They are HIGHLY recommended; by default, lighttpd
# will serve older TLS protocols that may be vulnerable to attack.
#
#ssl.engine = "enable"
#ssl.honor-cipher-order = "enable"
#ssl.disable-client-renegotiation = "enable"
# pemfile is cert+privkey, ca-file is the intermediate chain in one file
#ssl.pemfile = "/path/to/signed_cert_plus_private_key.pem"
#ssl.ca-file = "/path/to/intermediate_certificate.pem"
# ECDH/ECDHE ciphers curve strength (see `openssl ecparam -list_curves`)
#ssl.ec-curve = "secp384r1"
# Environment flag for HTTPS enabled
#setenv.add-environment = (
# "HTTPS" => "on"
#)
# Modern configuration, tweak to your needs
#ssl.use-sslv2 = "disable"
#ssl.use-sslv3 = "disable"
#ssl.cipher-list = "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256"
# HSTS(15768000 seconds = 6 months)
#setenv.add-response-header = (
# "Strict-Transport-Security" => "max-age=15768000;"
#)
######## mod_status config ########
# This is generally handy and won't expose any sensitive info.
#status.status-url = "/server-status"
# This will expose some of your configuration to the world!
#status.config-url = "/server-config"
######## mod_compress config ########
compress.cache-dir = var.statedir + "/cache/compress"
compress.filetype = ("text/plain", "text/html")
######## mod_proxy config ########
# See proxy.txt in lighttpd-doc package for more info.
# proxy.server = ( ".php" =>
# ( "localhost" =>
# (
# "host" => "192.168.0.101",
# "port" => 80
# )
# )
# )
# }}}
######## mod_auth config ########
# See authentication.txt in lighttpd-doc package 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" => "user=jan"
# ),
# "/server-info" =>
# (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "valid-user"
# )
# )
######## mod_rewrite config ########
# Apache-style mod_rewrite for implementing URL rewriting.
# See rewrite.txt in lighttpd-doc package for more info.
#
#url.rewrite = (
# "^/$" => "/server-status"
#)
######## mod_redirect config ########
# See redirect.txt in lighttpd-doc package for more info.
#
#url.redirect = (
# "^/wishlist/(.+)" => "http://www.123.org/$1"
#)
######## mod_expire config ########
# It is highly recommended you configure Expire: headers correctly to
# conserve bandwidth, especially for users on slow links.
#expire.url = (
# "/buggy/" => "access 2 hours",
# "/asdhas/" => "access plus 1 seconds 2 minutes"
#)
# {{{ mod_trigger_b4_dl
# see trigger_b4_dl.txt
#
# trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
# trigger-before-download.trigger-url = "^/trigger/"
# trigger-before-download.download-url = "^/download/"
# trigger-before-download.deny-url = "http://127.0.0.1/index.html"
# trigger-before-download.trigger-timeout = 10
# }}}
######## mod_webdav config ########
# lighttpd can act as a WebDAV server.
# See webdav.txt in lighttpd-doc package for more info.
#
#$HTTP["url"] =~ "^/dav($|/)" {
# webdav.activate = "enable"
# webdav.is-readonly = "enable"
#}
######## Debugging options ########
# debug.log-request-header = "enable"
# debug.log-response-header = "enable"
# debug.log-request-handling = "enable"
# debug.log-file-not-found = "enable"
# vim: set ft=conf foldmethod=marker et :
|