DeviceAはリバースプロキシとして機能し、次のようにリクエストを転送することになっています。
192.168.1.10 / DeviceB ==> 192.168.1.20/index.html
192.168.1.10 / DeviceC ==> 192.168.1.30/index.html
両方のインデックスファイルは/var/ wwwの下にあり、静的な「Helloworld!」です。ページ。問題は、DeviceAを介してこれらのファイルにアクセスできないことですが、DeviceC(ポート12345でリッスン)でも実行されているテストサービスを呼び出すと、すべて正常に機能します。
リクエストがポート80で着信した場合、DeviceB、DeviceCのWebサーバーはindex.htmlで応答する必要があると言っているのは間違っていますか?
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" )
アップデート
URLを書き換え/リダイレクトするためにproxy.server()の周りに$ HTTP ["host"] == ...が必要ですか?または、何をプロキシするかを定義する方法