问题描述
我试图让我们的Subversion版本库通过多个URL访问。要做到这一点,我想用LocationMatch指令。我的配置是:
I am trying to make our subversion repository accessible via multiple URLs. To do so, I was thinking to use the LocationMatch directive. My configuration is:
<Location ~ "/(svn|repository)">
DAV svn
SVNPath /opt/svn
AuthzSVNAccessFile /etc/subversion/access
</Location>
以上配置无法正常使用......奇怪的是,如果我使用例如此配置,它可以很好地用于两个网址:
The above configuration does NOT work ... Strange thing is that if i use for example this configuration, it works well for both URLs:
<Location ~ "/(svn|repository)">
SetHandler server-status
</Location>
对于我来说,它看起来像DAV SVN的结合,LocationMatch并未真正发挥作用......还是我在这里做错了什么?
For me it looks like the combination of DAV svn and LocationMatch does not really work... or am I doing something wrong here?
推荐答案
我也时遇到的,因为我想用regexs避免其他子路径越来越被我抓到匹配的问题。
I too am having problems with as I wanted to use regexs to avoid other subpaths getting caught by my match.
例如。
<LocationMatch "^/test/.*$>
是不一样的
<Location "/test">
如在后者中,将得到由抓最后一个,但不是第一个。所以才会。这就是为什么LocationMatch存在,但每当我把regexs失败。这似乎工作,如果我用LocationMatch W / O任何常规的前pressions虽然。
as in the latter, http://site.com/newproduct/test would get caught by the last one, but not the first one. So would http://site.com/test/scripts . This is why LocationMatch exists, but it fails whenever I put in regexs. It appears to work if I use LocationMatch w/o any regular expressions though.
这篇关于LocationMatch和DAV SVN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!