DeviceA用作反向代理和应该转发请求如下:lighttpd的作为反向代理
192.168.1.10/DeviceB ==> 192.168.1.20/index.html
192.168.1.10/DeviceC ==> 192.168.1.30/index.html
这两个索引文件都位于/ var/www下,并且是静态的“Hello world!”。页面。问题是我无法通过DeviceA访问这些文件,但是如果我调用一个也在DeviceC上运行的测试服务(侦听端口12345),那么一切正常。
我错了,说DeviceB上的Web服务器,DeviceC应该用index.html响应,如果端口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")
更新
我需要$ HTTP [ “主机”] == ...周围proxy.server()重写/重定向的URL?或者说,如何界定什么事代理(ED)
应该对serverfault,没有那么 – 2011-02-01 19:49:52