[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

multiple svn repositories on apache without a /svn/ path ?

From: Matthew Kerle <matthew.kerle_at_sra.com.au>
Date: 2006-11-08 02:01:14 CET

Hi all,
my setup is svn 1.3.1 running as an module under win32 apache 2.0.55:
(Apache/2.0.55 (Win32) DAV/2 SVN/1.3.1), server OS is Win2k.

Is there a way to host a collection of repositories from the root of
a website (apache virtual host) without using a /svn/ (or other) context?
I've seen a lot of advice on the net for how to do this, but it all relies
on using a sub folder of some kind on the server, whereas I'd like to
serve our projects from the root.

I've setup a DNS alias for the server called 'svn', so that we can access
our repositories via a url like 'http://svn/<project_name>/, and this
works fine, the only problem is that I need a separate apache
<Location> tag for each repository with the SVNPath directive, and
looking at http://svn/ just gives the apache welcome page, instead of
a list of repositories.
<Location /proj_a>
    DAV svn
    SVNListParentPath on
    SVNPath C:\SVN\proj_a
        AuthType Basic
        AuthName "Subversion repositories"
        AuthUserFile C:\Apache\Apache2\passwd
        Require valid-user
(..+ others that differ only in proj name & repo path)

I'd prefer to use a single location tag and the SVNParentPath directive
instead, like this:

NameVirtualHost *:80
<VirtualHost *:80>
    DocumentRoot C:\svn
    ServerName svn
    <Location />
        DAV svn
        SVNListParentPath on
        SVNParentPath C:\SVN
            AuthType Basic
            AuthName "Subversion repositories"
            AuthUserFile C:\Apache\Apache2\passwd
            Require valid-user

but I've run into some problems. When I setup the Virtual host
I can browse the repo ok with Firefox, and if I go to a url lower than
/trunk in the Tortoise repo browser it's fine (checkout,commit are ok),
but when I try to browse the repo root I get a '301 Moved Permanently
error on PROPFIND'.

According to the faq this happens when the svn repo overlaps with an
existing website or a file of the same name exists. The Server also
hosts our wiki, but that has a completely different document root
and when I try this I comment out all the other <Location>'s. There's
also definitely no file/folders in the other web root that have the
same name as the repositories, so I'm not sure whats happening.

Can anyone help me?

- Matthew Kerle

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Nov 8 10:39:09 2006

This is an archived mail posted to the Subversion Users mailing list.