本站首页    管理页面    写新日志    退出


«August 2025»
12
3456789
10111213141516
17181920212223
24252627282930
31


公告
 本博客在此声明所有文章均为转摘,只做资料收集使用。

我的分类(专题)

日志更新

最新评论

留言板

链接

Blog信息
blog名称:
日志总数:1304
评论数量:2242
留言数量:5
访问次数:7580370
建立时间:2006年5月29日




[Ruby on Rails]使用Mongrel替代scgi
软件技术

lhwork 发表于 2007/2/8 14:55:01

之前在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_service 2.运行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 myapp2 3.配置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


阅读全文(4515) | 回复(0) | 编辑 | 精华
 



发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)



站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.063 second(s), page refreshed 144777308 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号