I need to run 2 identical Rails apps (different only in the underlying database) behind the same domain (e.g. mydomain.com) and have Nginx route requests to RailsApp1 or RailsApp2 depending on the existence of a cookie in the request.
How can I do this?
how about write a rails app as the proxy?