我正在使用Lighttpd 1.4.30在Play Framework中配置负载均衡器.
我在lighttpd-inc.conf中给出了如下条目.
$HTTP["host"] =~ "http://10.74.9.109:9020" {
proxy.balance = "round-robin" proxy.server = ( "/" =>
( ( "host" => "10.74.9.109", "port" => 9020 ) ) )
}
$HTTP["host"] =~ "http://10.74.9.109:80" {
proxy.balance = "round-robin" proxy.server = ( "/" => (
( "host" => "10.74.9.109", "port" => 9020 ),
( "host" => "10.74.9.109", "port" => 9030 ) )
)
}
Run Code Online (Sandbox Code Playgroud)
我的播放应用程序在端口9020,9030上正常运行.
但是,当我尝试http://localhost:80
我的负载均衡器时,应将请求转移到任何未发生的端口.我只获得了Lighttpd测试页面.