Mongrel+lighttpd配置

豆豆网   技术应用频道   2008年01月18日  【字号: 收藏本文

本文详细介绍Mongrel+lighttpd配置

  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 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

责编:豆豆技术应用

正在加载评论...