-
Notifications
You must be signed in to change notification settings - Fork 25
/
lighttpd.conf
59 lines (51 loc) · 1.6 KB
/
lighttpd.conf
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
server.modules = (
"mod_access",
"mod_alias",
"mod_redirect",
"mod_fastcgi",
"mod_rewrite",
"mod_websocket",
)
server.document-root = "/var/www/htdocs"
server.upload-dirs = ( "/tmp" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.tag = "Server"
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm",
" index.lighttpd.html" )
# "~",
url.access-deny = ( ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".py" )
server.dir-listing = "disable"
include "mime.conf"
include "conf-enabled/10-ssl.conf"
include "conf-enabled/15-fastcgi-python.conf"
# Enable ACME challenge by skipping HTTP to HTTPS redirect and
# FastCGI interpretation.
$HTTP["scheme"] == "http" {
$HTTP["url"] =~ ".well-known/acme-challenge/*" {
fastcgi.server = ()
# IPv4 redirect
$HTTP["host"] !~ "\[.*\]" {
$HTTP["host"] =~ "^([^\:]+)(\:.*)?$" {
url.redirect = ()
}
}
# IPv6 redirect
$HTTP["host"] =~ "\[.*\]" {
$HTTP["host"] =~ "^([^]]+)(.)(\:.*)?$" {
url.redirect = ()
}
}
}
}
websocket.server = (
"/ws/stats" => ( "host" => "/tmp/ubnt.socket.statsd",
"port" => "1" ),
"/ws/cli" => ( "host" => "/tmp/ubnt.socket.cli",
"port" => "1",
"type" => "bin" )
)