svndnssymlinkvhostsmediatemple

Multi-domain Subversion Deployment on Media Temple DV


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.


Solution

  • 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.