-1

I created a Rails app with the name "demo" in my cPanel. I am a newbie in Rails, so forgive me if I am seeming to be so newbish! Now I created another rails app "secondapp". But when I go to my domain (http://mydomain.com) it displays only the demo app. How can I access the second app?

3 Answers 3

2

Probably the best (and easiest) thing to do would be to use subdomains (i.e. demo.mydomain.com and secondapp.mydomain.com). Outside of that I couldn't tell you much as I'm not familiar with how cPanel sets up rails apps.

1

Go into where it says "Manage Ruby on Rails Applications"
scroll down to where it says "Create A Rewrite", then map the url/subdomain you want to the rails app instance (that should be available in the "Available Ruby on Rails Applications" section ... mouse over URL to get the app instance url)

0

cPanel, by default, allows 4 Rails instances per account. Setting up additional apps requires them to be placed on a subdomain (as suggested above) or in a folder off the primary domain. It is also important to remember to setup the redirects required (through the cPanel RoR interface) so apache proxies the rails apps to the proper ports/folders.

cPanel has a nasty habit of wrecking the .htaccess file(s) as well so be sure to look there if you keep running into trouble. cPanel "forgets" to remove the previous redirects and sometimes you will find you have 5 of the same entries in .htaccess that will cause issues.

Not the answer you're looking for? Browse other questions tagged .