apachesvnwebdavmod-dav-svn

How to specify the repository in apache dav svn?


I have the following setup:

<VirtualHost *:80>
    ServerName svn.project1.com

    <Location />
       DAV svn
       SVNPath /svn
    </Location>
</VirtualHost>


<VirtualHost *:80>
    ServerName svn.project2.com

    <Location />
       DAV svn
       SVNPath /svn
    </Location>
</VirtualHost>

When I navigate to either http://svn.project1.com/ or http://svn.project1.com/, it gives a directory listing with both repositories:

Revision 1270: /

* project1/
* project2/

Powered by Subversion version 1.4.4 (r25188)

How do I get both hosts to point to their respective repositories?

I want to be able to use URLs like:

http://svn.project1.com/trunk/

Instead of:

http://svn.project1.com/project1/trunk/

And thus prevent access to e.g. project2 from project1 viz:

http://svn.project1.com/project2/

Solution

  • This works with SVNPath /svn/project#. But be aware, I think this only works if you really have two seperate repositories. As far as I can tell from your information, you're using one repository for both projects.