Linux上如何使用Lighttpd+FastCGI部署多个Rails应用

我用ruby构建了公司网站的多个应用,包括中文版,英文版,日文版,各个版本内部不同,所以使用了三个Rails应用进行构建,以前是在windows上运行,apache+mongrel,使用了apache的虚拟主机配置

由于性能问题,移植到了linux上,目前主网站英文运行正常,配置如下:

$HTTP["host"] == "10.10.66.37" {
server.document-root = "/www/use_en/public"
server.error-handler-404 = "/dispatch.fcgi"
fastcgi.server = (".fcgi" =>
("localhost" =>
("min-procs" => 10,
"max-procs" => 10,
"socket" => "/tmp/lighttpd/socket/rails.socket",
"bin-path" => "/www/use_en/public/dispatch.fcgi",
"bin-environment" => ("RAILS_ENV" => "production")
)
)
)
}


中文版的root是/www/use_zh/public,我希望通过http://10.10.66.37/zh的方式进行访问,但增加了这样的设置,启动失败

$HTTP["host"] == "10.10.66.37" {
server.document-root = "/www/use_zh/public"
alias.url = ("/zh" => "/www/use_zh/public")
server.error-handler-404 = "/dispatch.fcgi"
fastcgi.server = (".fcgi" =>
("localhost" =>
("min-procs" => 10,
"max-procs" => 10,
"socket" => "/tmp/lighttpd/socket/rails.socket",
"bin-path" => "/www/use_zh/public/dispatch.fcgi",
"bin-environment" => ("RAILS_ENV" => "production")
)
)
)
}


又在原有的en上增加了alias进行尝试,发现无效
alias.url = ("/en" => "/www/use_en/public")


望robbin指教

你可能感兴趣的:(Rails,lighttpd,Linux,Socket,Ruby)