SVN over HTTP on (mt) DV 3.0
In five steps, you can set up an Apache-served, Subversion repository on a MediaTemple (mt) Dedicated Virtual Server.
Prerequisites
-
(mt) DV 3.0 account provisioned with Apache 2.0 and Subversion 1.1.4 or higher
root access via SSH and Plesk
basic understanding of UNIX permissions
prior experience configuring Apache and Subversion to work together
1. Create a subdomain
-
Via the browser, log in to Plesk and navigate to General » Subdomains
Select a domain and opt to add a new subdomain
Name the subdomain (e.g., 'svn-test') and click Save
Log out of Plesk
2. Create a repository
-
Via SSH, log in to the domain (e.g., 'mydomain.com') of the subdomain created in Step 1
Create a new repository (e.g., 'repos') in the directory of the subdoman like so:
svnadmin create /var/www/vhosts/mydomain.com/subdomains/svn-test/reposSet ownership:
chown svn:psaserv /var/www/vhosts/mydomain.com/subdomains/svn-test/repos
3. Configure Virtual Hosting
-
Create a vhost.conf file for the subdomain containing something like:
<Location> DAV svn SVNPath /var/www/vhosts/mydomain.com/subdomains/svn-test/repos AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/svn-auth-file Require valid-user </Location>Save the file as
/var/www/vhosts/mydomain.com/subdomains/svn-test/vhost.confUpdate the Apache configuration with the subdomain configuration like so:
/usr/local/psa/admin/sbin/websrvmng --vhost-name=svn-test.mydomain.comRestart Apache
/usr/local/psa/admin/sbin/websrvmng --restart
4. Check in code
-
Import your code. For example, on my local file system, I have a tmp/ directory containing code in the conventional trunk/, branches, tags/ layout. I'll import it like so:
import tmp/ http://svn-test.mydomain.com --username=hank
5. Verify
-
Browse to it: http://svn-test.mydomain.com