之前在Windows计算机上开发Rails Application , 使用的是 lighttpd+scgi, 后来看到 Mongrel升级了,但由于不支持Ruby 1.8.2 ,所以一直都没有更换。前几天由于需要使用 Multibyte for Rails , 将Ruby 1.8.2 升级为了 1.8.4版本,所以将原来开发环境中使用的 lighttpd+scgi 也更换为了 lighttpd+Mongrel ,这是在Windows平台下开发RubyonRails应用的首选,附安装步骤:
1.安装Mongrel
$ gem install win32-service (pick the most recent one)
$ gem install mongrel (pick the win32 pre-built)
$ gem install mongrel_service2.运行Mongrel服务(多个应用)
$ mongrel_rails service::install -N myapp1-c c:mypathtomyapp1 -p 4000 -e production$ mongrel_rails service::start -N myapp1$ mongrel_rails service::install -N myapp2-c c:mypathtomyapp2 -p 4001 -e production$ mongrel_rails service::start -N myapp23.配置Lighttpd
server.modules = (”mod_proxy”,
“mod_rewrite”,
“mod_accesslog”,
“mod_alias” )$HTTP[”url”] =~ “^/myapp1/” {
proxy.server = (”" => (
(”host” => “127.0.0.1″,”port” => 4000)
)
)
}$HTTP[”url”] =~ “^/myapp2/” {
proxy.server = (”" => (
(”host” => “127.0.0.1″,”port” => 4001)
)
)
}3.访问路径
http://localhost/myapp1
http://localhost/myapp2
Tags:





九月 29th, 2006 at 9:25 am
这次有没有对lighttpd mongrel作压力测试?结果与lighttpd scgi相比是好还是坏?