I have a single rails app running on a Rackspace VPS. The stack is rails3 + unicorn + nginx + mysql.
There is a primary domain that sends traffic directly to the unicorn socket using proxy_pass
.
I have a new engine developed that's mounted under /digital
. Right now, people can interact with that engine via http://primarydomain.com/digital.
I want to host a new domain that forwards requests directly to /digital
; not to the root engine.
So for instance, the following requests would yield equivilent results:
http://primarydomain.com/digital/splash
http://alternatedomain.com/splash
In a perfect world, the engine would be a separate app. I want to act as if the separate domain is a separate app although it's really a mounted engine.
Here's what the routes.rb
looks like:
Company::Application.routes.draw do
root :to => 'spree/home#splash'
ActiveAdmin.routes(self)
mount Core::Engine, :at => '/'
mount Another::Engine, :at => '/digital'
end
What rails + nginx configuration do I need to get this working?