如果在你有app3是用Rails2.1开发的,那么由于map.resource的特性,在以上代码中增加一个/app3/得这么写了: 1. 启动mongrel时使用prefix参数:
mongrel_rails mongrel::start --prefix /app3 -p 5001 mongrel_rails mongrel::start --prefix /app3 -p 5002 2.在以上conf文件中增加两段代码: upstream mongrel_cluster3 { server 127.0.0.1:5001; server 127.0.0.1:5002; } location /app3/ { proxy_pass http://mongrel_cluster3/app3/; } On 7月1日, 下午7时54分, Caiwangqin <[EMAIL PROTECTED]> wrote: > i found config from:http://www.ruby-forum.com/topic/128598#573601 > > my nginx version: 0.6.13 > and here is my full working nginx.conf: > > user www; > worker_processes 1; > > events { > worker_connections 1024; > > } > > http { > > include mime.types; > > upstream mongrel_cluster1 { > server 127.0.0.1:3001; > server 127.0.0.1:3002; > > } > > upstream mongrel_cluster2 { > server 127.0.0.1:4001; > server 127.0.0.1:4002; > > } > > server { > listen 127.0.0.1:80 default deferred; > > location /app1/ { > proxy_passhttp://mongrel_cluster1/; > } > > location /app2/ { > proxy_passhttp://mongrel_cluster2/; > } > > } > } > > his config file works find in Rails 1.2.x, but not work for Rails > 2.1. do you know how to make it works for Rails 2.1? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Deploying Rails" group. To post to this group, send email to rubyonrails-deployment@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-deployment?hl=en -~----------~----~----~----~------~----~------~--~---