I have a Rails 2 app that serves multiple domains. That is, http://domainA.com and http://domainB.com are both served by the same Rails app. When I launch these manually, I specify which site I want to see by passing a site
variable: site=domainB ruby script/server
.
I'd like to use Pow so that I can access both sites via http://domainA.myapp.dev and http://domainB.myapp.dev (I'd also be happy with http://domainA.dev and http://domainB.dev if that's easier).
I can do this manually by adding export site="domainB"
to my .powrc
file, and editing that by hand (then doing touch tmp/restart.txt
) each time I want to switch sites ... I'd prefer something a bit more automatic, though. I'm thinking something like the equivalent of subdomain == domainA ? export site="domainA" : export site="domainB"
within the .powrc
file.