Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've found a few guides for setting up a subversion repository and making it available via a subdomain (using a virtual host in Apache), but for some reason can't get things working. Here's what I've got so far:

  1. Created a subdomain ""
  2. Configured Apache with a new VirtualHost:

    <VirtualHost *:80>
            DAV svn
            SVNPath /Volumes/Storage/Resources/Subversion/svn_repo

For now I don't have any authentication set up (to keep things simple until I get this working).

Am I missing something obvious? If not, any ideas/suggestions?

share|improve this question
Are you getting an error? That might help narrow down what is going on. Also make sure somewhere in your configuration you are loading the dav module with LoadModule dav_svn_module modules/ – Alex Mar 26 '11 at 22:27
Ah, looks like I don't have mod_dav_svn installed/configured. I'll get that going and see if that gets things working. – Wilco Mar 26 '11 at 23:51
up vote 1 down vote accepted

You need to create your htpasswd file and tell SVN about it. Here are my notes on setting up SVN on Centos 5.5:

Install SVN
# yum install mod_dav_svn subversion

Create the SVN Config File
# vi /etc/httpd/conf.d/subversion.conf

Add the first repo to the file above
<Location />
   DAV svn
   SVNPath /var/www/svn/
   AuthType Basic
   AuthName "Subversion Repo"
   AuthUserFile /etc/svn-auth-conf
   Require valid-user

Create the password file
# htpasswd -cm /etc/svn-auth-conf yourusername

Create another user
# htpasswd -m /etc/svn-auth-conf anotherusername

Create repository
# svnadmin create /var/www/svn/

Set Permissions
# chown apache -R /var/www/svn

Hope that helps!

share|improve this answer

i know this is a old question, but i ran with this problem and i was able to setup the subdomain to host all my repositories following this tutorial

just mention on "SVNParentPath" you should enter the absolute path , ex: "/var/www/svn/" ,

share|improve this answer

I had a similar problem.

Directory access rights were the reason. If you do not provide DocumentRoot, then Apache chooses its default DocumentRoot. And if an access to the default DocumentRoot is denied -- then SVN is also denied.

Just set DocumentRoot in your VirtualHost to an existing, empty directory and in a <Directory> section grant the allow right to that directory.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.