Mac OS X Server 10.6 Snow Leopard

The following is a summary of recipes found on the Web, adapted to our site.

  • If not already done so, enable Web service in the General settings of your server.

  • Become root: sudo -s.

  • Create a folder holding the SVN repositories. We are using /Volumes/Data2/Library/Subversion/Repository.

  • In Terminal, create a new SVN repository, for example svnadmin create /Volumes/Data2/Library/Subversion/Repository/basis.

  • Finally, adjust ownership and permissions:

chown -R _www:cvs /Volumes/Data2/Library/Subversion/Repository
chmod -R ug+rwX,o= /Volumes/Data2/Library/Subversion/Repository
  • Open Server Admin, select Web service.

Enable the dav_svn_module

Create a new site. We are using port 443 (SSL) here. Note: Either hostname or port must be unique in the list of sites hosted.

Enable WebDAV for the site under the options tab.

Enable SSL under the Security tab.

Define a WebDAV realm for the repository. Click the Plus button under the left-hand list in the Realms section and edit the corresponding entries as shown here.

Using the Plus button under the list on the right-hand side, add users and groups, giving them read and write permissions. Make sure that the permissions of the group Everyone is set to None.

  • Click Save to save the new site. Do not yet start or restart Web service.

Back in Terminal, edit /etc/apache2/sites/0001_any_443_svn.cpfs.mpg.de.conf. In the /svn/ location block near the end of the file, insert the lines

DAV svn
SVNParentPath /Volumes/Data2/Library/Subversion/Repository

Save your changes, return to Server Admin, and start or restart Web service. With Safari, connect to https://svn.cpfs.mpg.de/svn/basis/. After accepting the certificate and authenticating with the server, you should see something like this:

Caveat: If you apply further modifications to the SVN site just created using Server Admin, it might happen, that the line DAV yes in the configuration file is set to DAV no. Just in case there are problems with the access to the repository, correct this mistake and restart Web service.