multi-domain to multiple roots & one rails-app

Frantisek Psotka lists at ruby-forum.com
Thu May 10 19:59:42 UTC 2012


Hello,

I wish to consult an configuration for following situation. Thanks for
any suggestion.

I have multi domain rails app and for each domain there is a need for
serving static files outside of rails, each domain from separated path.

so for example:

mydomain.com/one/route
  -> will go to rails app

mydomain.com/static/another/route.png
  -> will serve file on path /somewhere/mydomain.com/another/route.png

or in general:

DOMAIN/static/PATH will serve file /somewhere/DOMAIN/PATH
and DOMAIN/PATH will go to the rails app

This should work for any sub/domain.

Thanks! All suggestions are welcome.

-- 
Posted via http://www.ruby-forum.com/.



More information about the nginx mailing list