Welcome Guest | Login

capistrano and path to subdomain

I am having trouble creating a subdomain.  When I use the cPanel interface subdomain.domain.com ends up pointing at ~/releases/20070116171902/public/subdomain which  will only work up until the next capistrano deployment.

The problem is the symbolic links that are created by capistrano....

public_html -> current/public/
current -> ~/releases/20070116171902/

I would like for subdomain.domain.com to point to ~/public_html/subdomain.

I hope my problem is somewhat clear.

Thanks in advance for your help.
Lisa


2007-01-16 12:08 PM

All you have to do is remove the old sym-link and make a new one. Do this:

rm -rf ~/currentsymlink   (or whatever your path to the symlink is) then do:

ln -s ~/source ~/destination  you can also use the full path if you'd like:

ln -s /path/to/source/dir /path/to/destination/dir

~/source is the real location of the folder, and destination is the fake (sym-link) folder.
Think of a sym-link as a shortcut in Windows (like in the Start Menu's 'Startup folder')
Does that help? If you still have trouble with it I'll login to your account and fix it up for you.      

Seth

2007-01-16 12:21 PM

Seth
The problem is not the symlinks.  It's the fact that because of the Capistrano symlinks my subdomain is pointing to a directory that might not exist in two weeks.  This is the information from cPanel...
Current Sub-Domains  blog.domainname.com (winetaggers/releases/20070116171902/public/blog)

That is blog.domainname.com is pointing the version of the site that was released on January 16, 2007.  Of course I could make blog a symlink to my desired directory and leave this version of the site on the server permanently but that's a little messy.  I would prefer that you make the change to the DNS records so that blog.domainname.com points to ~/public_html/blog, which is not transient.

Lisa

2007-01-17 05:00 AM

Hi there - I just double checked in your vhost entry:

DocumentRoot /home/<username>/public_html/blog

So you get what you ask for I suppose - if this is symlinked to something you don't want it to be...them remove it and recreate the symlink so that ~public_html/blog points to exactly where you want the DocumentRoot of your blog to be.  If you need further help with this let me know.

Cheers,

~William

2007-01-17 07:39 PM

Great, that's what I needed to know.  Even though the cPanel interface is displaying the link destination, what's in the vhost entry is the link itself.

Thanks vey much,
Lisa

2007-01-18 04:20 AM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.