0

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?

Wilco
  • 365
  • 5
  • 17
  • 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

3 Answers3

1

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!

Jesse Bunch
  • 324
  • 2
  • 9
0

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/" ,

Joyal
  • 101
  • 1
  • 6
0

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.

jacek.ciach
  • 133
  • 1
  • 6