forked from domoticz/domoticz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlighttpd_proxy.conf
56 lines (50 loc) · 1.81 KB
/
lighttpd_proxy.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
# A lighttpd config file for proxying Domoticz traffic
#
# Make sure you set the Document-root to your full-path of the Domoticz WWW directory
#
# ALL calls will be proxied to the Domoticz webserver/webservice that is expected to run on port 8080 (No SSL)
# You can start Domoticz for example with the following config
# sudo ./bin/domoticz -www 8080 -wwwroot www -loglevel debug,error -debuglevel webserver
# Adding the 'received' flag (next to the webserver flag) to the debuglevel as well, will produce detailed input header debug info.
#
# Domoticz will show the (web)requests it handles
#
# Start this script from your Domoticz home directory with:
# lighttpd -D -f test/lighttpd.conf
#
# Because lighttpd acts as a proxy, it will add Proxy-headers to the incoming requests when sending these through to Domoticz (visible with debug flags mentioned above)
#
# Now you can access Domoticz on port 8888 (http://localhost:8888)
server.document-root = "/home/vagrant/domoticz/www/"
server.port = 8888
accesslog.format = "%h %V %u %t \"%r\" %>s %b"
accesslog.filename = "/tmp/lighttpd_proxy.log"
index-file.names = ( "index.html" )
server.modules = (
"mod_indexfile",
"mod_accesslog",
"mod_proxy"
)
mimetype.assign = (
".html" => "text/html;charset=UTF-8",
".txt" => "text/plain;charset=UTF-8",
".css" => "text/css;charset=UTF-8",
".js" => "text/javascript;charset=UTF-8",
".jpg" => "image/jpeg",
".png" => "image/png",
".json" => "application/json;charset=UTF-8"
)
proxy.forwarded = ( "for" => 1,
"proto" => 1,
#"host" => 1,
#"by" => 1,
#"remote_user" => 1
)
proxy.server = ( "/" =>
( "domoticzservice" =>
(
"host" => "localhost",
"port" => "8080"
)
)
)