I'm currently working on something similar, and just made a Nginx configuration. That is exactly what I did.
server { listen 80; server_name domain1.com domain2.com domain3.com; rails_env production; passenger_enabled on; root /var/www/your_site_folder/current/public; }
Also, make sure you use user_pre_start if you are using a passenger.
ex: passenger_pre_start http://your_domain.com ;
Add one line for each domain that you have added to the above configuration block.
The key here is under the name server_name. Normally I would use this for a domain using www.domain.com or without "www", domain.com. But in this case, you can specify all the domains from which you want to get into your application, and you have the Nginx setting for multi-tenant rent.
source share