-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlighttpd.conf
80 lines (69 loc) · 2.63 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
"mod_accesslog",
"mod_proxy",
"mod_rewrite"
)
$HTTP["url"] =~ "^(.*)/v1/textpresso/api" {
proxy.server = ( "" => ("" => ( "host" => "127.0.0.1", "port" => 8081 )))
}
$SERVER["socket"] == ":8081" {
url.rewrite-once = ( "^(.*)/v1/textpresso/api/(.*)" => "/v1/textpresso/api/$2" )
proxy.server = ( "" => ( "" => ( "host" => "127.0.0.1", "port" => 18080 )))
}
url.rewrite-once = ( "^(.*)/tpc/images/(.*)" => "$1/images/$2" )
#set doc root to tpc root
server.document-root = "/usr/lib/cgi-bin/tc/"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.port = 80
index-file.names = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
# default listening port for IPv6 falls back to the IPv4 port
## Use ipv6 if available
#include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
server.breakagelog = "/var/log/lighttpd/breakage.log"
accesslog.filename = "/var/log/lighttpd/access.log"
#configure tpc cgi
server.modules += ( "mod_fastcgi" )
fastcgi.server += ("/tpc" =>
("tpc" =>
("socket" => "/usr/wt/socket",
"bin-path" => "/usr/lib/cgi-bin/tc/tpc",
"max-procs" => 100,
"idle-timeout" => 60,
"check-local" => "enable",
"bin-environment" => ("FOO" => "bar")
)
)
)
#redirect root to tpc
url.redirect = (
"^/$" => "/tpc"
)
#increase number of files that can be opened. Required by Lucene
server.max-fds = 4096
server.max-keep-alive-idle = 100
server.max-read-idle = 100
server.max-write-idle = 360
$HTTP["url"] =~ "^/NNClassification($|/)" {
server.document-root = "/data/textpresso/classifiers/"
server.dir-listing = "enable"
}
#redirect traffic on port 80 to secure connection
#$SERVER["socket"] == ":80" {
# url.redirect = (
# "^/(.*)" => "https://www.textpressocentral.org/$1"
# )
#}