如何在apache dav svn中指定存储库?
我有以下设置:
<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>
当我导航到 http://svn.project1.com/ 或 < a href="http://svn.project1.com/" rel="nofollow noreferrer">http://svn.project1.com/,它提供了两个存储库的目录列表:
Revision 1270: /
* project1/
* project2/
Powered by Subversion version 1.4.4 (r25188)
我如何获取两个主机都指向各自的存储库?
我希望能够使用如下 URL:
http://svn.project1.com/trunk/
而不是:
http://svn.project1.com/project1/trunk/
从而阻止从project1访问例如project2,即:
http://svn.project1.com/project2/
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/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这适用于
SVNPath /svn/project#
。 但请注意,我认为这只有在您确实有两个单独的存储库时才有效。 据我从您的信息来看,您正在为这两个项目使用一个存储库。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.不确定,但你试过这个吗?
Not sure, but have you tried this?
虽然使用
应该可以解决您的问题,但它会暴露 DavSVN 的严重缺陷。 缺陷在于它在域的根目录中存在问题。 出现随机签入错误目前没有可用的解决方案,这是一个我们必须从子域切换到子目录的问题。
While using
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.