-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlighttpd.conf
59 lines (46 loc) · 1.89 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.document-root = "/opt/share/www"
server.upload-dirs = ( "/tmp" )
server.errorlog = "/opt/var/log/lighttpd/error.log"
#accesslog.filename = "/opt/var/log/lighttpd/access.log"
server.pid-file = "/opt/var/run/lighttpd.pid"
#server.username = "http"
#server.groupname = "www-data"
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm",
)
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
### Options that are useful but not always necessary:
#server.chroot = "/"
#server.port = 81
#server.bind = "localhost"
#server.tag = "lighttpd"
#server.errorlog-use-syslog = "enable"
#server.network-backend = "writev"
### Use IPv6 if available
#include_shell "/opt/share/lighttpd/use-ipv6.pl"
#dir-listing.encoding = "utf-8"
#server.dir-listing = "enable"
include "/opt/etc/lighttpd/mime.conf"
include "/opt/etc/lighttpd/conf.d/*.conf"
#url.rewrite-once=(
# "wan\.getInfo$" => "/api/1.0/wan",
# "system\.getInfo$" => "/api/1.0/system",
# "ftth\.getInfo$" => "/api/1.0/ftth",
# "lan\.getInfo$" => "/api/1.0/lan"
#)
url.rewrite-once = (
"^(/api/1.0.*)" => "$0",
"^(/(lib|media|ws|tests)/.*)" => "$0",
"^/([^\?]+)(\?(.*))?$" => "/index.php/$1?$3"
)
$HTTP["scheme"] == "http" {
$HTTP["url"] !~ "^/index.php/error/" {
$HTTP["url"] !~ "^/api/" {
$HTTP["host"] =~ "^(.*)$" {
url.redirect = (
"^(.*)$" => "https://%1$1"
)
}
}
}
}