How to specify the repository in apache dav svn?
-
21-08-2019 - |
Question
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/
Thanks!
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.
OTHER TIPS
<Location /svn/>
DAV svn
SVNParentPath "D:\repos"
SVNListParentPath On
AuthName "Subversion repository"
SVNPathAuthz on
AuthType SSPI
SSPIAuth On
SSPIAuthoritative On
SSPIDomain RAILINC
SSPIOfferBasic On
SSPIUsernameCase lower
SSPIOmitDomain On
AuthzSVNAccessFile "D:\repos\svnaccessfile.txt"
Require valid-user
</Location>
Not sure, but have you tried this?
SVNPath /svn/project1/
While using
SVNPath /svn/projectX/
should fix your problem, it will expose a serious flaw in DavSVN. The flaw that it has problems with being at the root directory of a domain. Getting random checkin errors that at present, have no solution available, was such a problem we had to switch from a subdomain to a subdirectory.