DeviceA serves as a reverse-proxy and is supposed to forward requests as follows:
192.168.1.10/DeviceB ==> 192.168.1.20/index.html
192.168.1.10/DeviceC ==> 192.168.1.30/index.html
Both index files are located under /var/www and are static "Hello world!" pages. The problem is that I can't access those files through DeviceA, but if I call a test service also running on DeviceC (listening on port 12345) everything works fine.
Am I wrong saying that the web server on DeviceB, DeviceC should respond with index.html if a request comes in on port 80 ???
lighttpd.conf DeviceA @192.168.1.10 server.modules = ( "mod_proxy" )
proxy.server = (
"/DeviceB" => ( "" => ( "host" => "192.168.1.20", "port" => 80 )),
"/DeviceC" => ( "" => ( "host" => "192.168.1.30", "port" => 80 )),
"/TestService" => ( "" => ( "host" => "192.168.1.30", "port" => 12345 ))
)
lighttpd.conf DeviceB @192.168.1.20
server.document-root = "/var/www"
server.port = 80
index-file.names = ( "index.html" )
lighttpd.conf DeviceC @192.168.1.30
server.document-root = "/var/www"
server.port = 80
index-file.names = ( "index.html" )
Update
Do I need $HTTP["host"] == ... around proxy.server() to rewrite/redirect URLs? Or, how to define what shall be proxy(ed)