Set Domain to Rails Folder on Hostmonster

December 6th, 2007

To set main domain to your rails folder on your Hostmonster account, do the following.

1. ssh into your account

2. Rename your public_html folder to public_html_old

username@domain.com [~]# mv public_html public_html_old

3. Create a link to your rails/public folder called public_html

username@domain.com [~]# ln -s ~/route/to/app/public public_html

Now the public_html@ link will be treated as if it is the old public_html folder. It’s one of the wonders of *nix.

note: This gives some grief when creating subdomains, showing “Application error Rails application failed to start properly”. I think it’s reading the dispatch files by default rather than doing the subdomain. I’ll have to look into it a bit more. If you only need your main domain though, this works nicely.


Trackback URI | Comments RSS

Leave a Reply

Name (required)

Email (required)

Website

Speak your mind