Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 "svn.mydomain.com"
  2. Configured Apache with a new VirtualHost:

    <VirtualHost *:80>
        ServerAdmin info@mydomain.com
        ServerName svn.mydomain.com
        <location>
            DAV svn
            SVNPath /Volumes/Storage/Resources/Subversion/svn_repo
        </location>
    </VirtualHost>
    

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/mod_dav_svn.so –  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

2 Answers 2

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 /domain.com>
   DAV svn
   SVNPath /var/www/svn/domain.com
   AuthType Basic
   AuthName "Subversion Repo"
   AuthUserFile /etc/svn-auth-conf
   Require valid-user
</Location>

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/domain.com

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

http://dhruba.name/2011/05/23/installing-subversion-using-subdomain-on-apache-and-debian/

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

share|improve this answer

Your Answer

 
discard

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.