views:

481

answers:

1

This is a question pretty specific to Media Temple DV servers, but I'm hoping someone out there can help. Our deployment process on a DV server involves ssh'ing in and doing a Subversion checkout into a folder called "svn" and then creating a symlink in "httpdocs" to point to a release folder in that "svn" folder. I'm wondering if it's possible to create a symlink on a separate domain that points to the same folder (essentially, two sites sharing a codebase but with different httpdocs). Would look something like:

/vhosts
    /my-domain/
        /httpdocs (symlink points to svn)
        /svn
    /my-other-domain
        /httpdocs (symlink points to svn in my-domain)

Is this possible at all in any situation? And if it is, is it possible on a media temple DV server? I can't seem to get it to work (in the example above, I can get "my-domain" working with no problems, but cannot do the "cross-domain" symlink.

+1  A: 

You should be able to do this. Are you symlinking to the full path? (/var/www/vhosts/my-domain/svn/ ... ) What errors are you getting?

Why don't you do your SVN checkouts to separate directory (/var/www/vhosts/svn) and then do your symlinking to that? (ln -s /var/www/vhosts/svn/folder /var/www/vhosts/my-domain/httpdocs)

On my MT DV I have multiple domains pulling the same core PHP lib from a central directory. To do so I had to setup the openbasedir directive in vhost.conf and also use the full path to the libs in my includes.

Darren Newton
Yeah, I did the open_basedir thing and full paths. No dice. Clearly it's possible though so I must have made a mistake along the way. Thanks for your response.
Typeoneerror
You might want to post this to ServerFault - which is more sysadmin centric.
Darren Newton
aaaand...I forgot to restart apache after changing open_basedir settings. dumb. ass. thanks, guys.
Typeoneerror
I've done that on more than one occasion.. glad you got it sorted.
Darren Newton