1
|
config {
|
2
|
var.PID = 3029
|
3
|
var.CWD = ""
|
4
|
var.home_dir = "/var/www"
|
5
|
var.conf_dir = "/etc/lighttpd"
|
6
|
var.log_root = "/var/log"
|
7
|
var.server_root = "/var/www/domotica/web"
|
8
|
var.state_dir = "/var/run"
|
9
|
server.modules = (
|
10
|
"mod_rewrite",
|
11
|
"mod_redirect",
|
12
|
"mod_fastcgi",
|
13
|
"mod_compress",
|
14
|
"mod_openssl",
|
15
|
"mod_accesslog",
|
16
|
"mod_wstunnel",
|
17
|
# 7
|
18
|
)
|
19
|
server.upload-dirs = ("/tmp")
|
20
|
server.document-root = "/var/www"
|
21
|
index-file.names = ("app.php", "index.php", "index.htm", "default.htm")
|
22
|
server.errorlog = "/dev/null"
|
23
|
fastcgi.debug = 0
|
24
|
fastcgi.server = (
|
25
|
".php" => (
|
26
|
(
|
27
|
"bin-path" => "/bin/php-cgi",
|
28
|
"socket" => "/var/tmp/php.socket",
|
29
|
"max-procs" => 1,
|
30
|
"bin-environment" => (
|
31
|
"PHP_FCGI_CHILDREN" => "5",
|
32
|
"PHP_FCGI_MAX_REQUESTS" => "1000",
|
33
|
# 2
|
34
|
),
|
35
|
"broken-scriptfilename" => "enable",
|
36
|
# 5
|
37
|
),
|
38
|
),
|
39
|
)
|
40
|
url.rewrite-if-not-file = (
|
41
|
"^/$" => "$0",
|
42
|
"^/(?!.+\.php)[^\?]+(\?.*)?" => "app.php/$1$2",
|
43
|
# 2
|
44
|
)
|
45
|
server.port = 80
|
46
|
server.use-ipv6 = "disable"
|
47
|
server.username = "root"
|
48
|
server.groupname = "root"
|
49
|
server.tag = "lighttpd"
|
50
|
server.pid-file = "/var/run/lighttpd.pid"
|
51
|
server.event-handler = "linux-sysepoll"
|
52
|
server.max-fds = 2048
|
53
|
server.stat-cache-engine = "simple"
|
54
|
server.max-connections = 1024
|
55
|
server.max-keep-alive-idle = 5
|
56
|
static-file.exclude-extensions = (".php", ".pl", ".fcgi", ".scgi")
|
57
|
mimetype.assign = (
|
58
|
".png" => "image/png",
|
59
|
".jpg" => "image/jpeg",
|
60
|
".jpeg" => "image/jpeg",
|
61
|
".gif" => "image/gif",
|
62
|
".js" => "text/javascript",
|
63
|
# 5
|
64
|
".css" => "text/css",
|
65
|
".html" => "text/html",
|
66
|
".htm" => "text/html",
|
67
|
".pdf" => "application/pdf",
|
68
|
".swf" => "application/x-shockwave-flash",
|
69
|
# 10
|
70
|
".spl" => "application/futuresplash",
|
71
|
".txt" => "text/plain",
|
72
|
".tar.gz" => "application/x-tgz",
|
73
|
".tgz" => "application/x-tgz",
|
74
|
".gz" => "application/x-gzip",
|
75
|
# 15
|
76
|
".c" => "text/plain",
|
77
|
".conf" => "text/plain",
|
78
|
"" => "application/octet-stream",
|
79
|
# 18
|
80
|
)
|
81
|
server.follow-symlink = "enable"
|
82
|
|
83
|
|
84
|
$HTTP["url"] =~ "^/websockify" {
|
85
|
# block 1
|
86
|
wstunnel.server = (
|
87
|
"" => (
|
88
|
(
|
89
|
"host" => "127.0.0.1",
|
90
|
"port" => "5900",
|
91
|
# 2
|
92
|
),
|
93
|
),
|
94
|
)
|
95
|
wstunnel.frame-type = "binary"
|
96
|
|
97
|
} # end of $HTTP["url"] =~ "^/websockify"
|
98
|
|
99
|
$SERVER["socket"] == "0.0.0.0:443" {
|
100
|
# block 2
|
101
|
ssl.pemfile = "/etc/domopagweb.pem"
|
102
|
ssl.engine = "enable"
|
103
|
|
104
|
} # end of $SERVER["socket"] == "0.0.0.0:443"
|
105
|
}
|