Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers 3

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.