I'm trying to deploy a multisite Rails app with different views and public folders for each site. Let's say that we have www.foo.com and www.bar.com. Inside my RAILS_ROOT directory I have a [sites] directory with two folders inside [foo] and [bar] each folder consists of a [public] and [views] folder.
My nginx configuration has to be something like that:
server {
listen 80;
server_name www.foo.com;
root RAILS_ROOT/sites/bar/public;
passenger_enabled on;
rails_env development;
}
server {
listen 80;
server_name www.bar.com;
root RAILS_ROOT/sites/bar/public;
passenger_enabled on;
rails_env development;
}
My problem is that nginx can't actually find RAILS_ROOT as it 开发者_运维技巧expects a usual hierarchy for the public folder RAILS_ROOT/public. Any solution for this?
When I referer to RAILS_ROOT I don't mean the variable I use it instead of writing a specific path .../.../
精彩评论