问题描述
尝试从我的 SVN 存储库结帐给我
svn: E195019: 检测到 URL 的重定向循环...但是,这个错误似乎只发生在我位于某个(特定)代理服务器之后.
如其他帖子所述(参见 tortoise svn 给我检测到 URL 'domain/svn' 的重定向循环"),如果 SVN DAV 配置错误,例如,使用 SVNParentPath,而应该使用 SVNPath,则会发生此错误.但是,我的配置似乎是正确的,而且 - 据我所知 - 只有在代理后面时才会出现问题.
存储库的设置或多或少是标准的,例如
ServerAlias svn.mydomain.com<位置/myrepo>DAV SVNSVNPath/var/www/vhosts/mydomain.com/svn/myrepoAuthType 基本AuthName "mydomain svn"AuthUserFile/var/www/vhosts/svn.mydomain.com/conf/htpasswd-myproject# 允许任何人只读访问,否则需要# 需要认证需要有效用户</位置>(我自己的问题给出了答案,用了半个周末的时间寻找解决方案):
似乎此错误消息与 subversion 存储库位于目录 svn/myrepo
中的事实有关,其中目录 svn
也被列为子域 svn.mydomain.com
的 DocumentRoot.该 DocumentRoot 指令对我来说并不明显,因为子域的文档根是在不同的 conf 文件中配置的(我使用 Plesk 来维护服务器).这造成了某种模棱两可.一旦我将子域的文档根目录移动到其他位置,错误消息就消失了.
这个问题很难追查,因为 - 据我所知 -
如果 repo 位于子域的顶级,即
和
SVNPath/var/www/vhosts/,则不会出现错误mydomain.com/svn
在上面的配置中.只有通过代理访问存储库时才会显示错误.
与 DocumentRoot 的冲突并不那么明显,因为它是一个子域.
总结一下:解决方案(使用 Plesk 时):将 Plesk 设置 (GUI) 中子域的DocumentRoot"更改为与 SVN 目录不同的内容.www.mydomain.com 的DocumentRoot"是 httpdocs
.svn.mydomain.com 的DocumentRoot"是(默认情况下)svn
.我将其更改为 httpdocs-svn
并且问题消失了.文件夹 httpdocs-svn
未在我的设置中使用,因为 svn.mydomain.com 下的所有内容均由 DavSVN 处理.
Trying to checkout from my SVN repo gives me
svn: E195019: Redirect cycle detected for URL ...
However, it appears as if this error only occurs when I am behind some (specific) proxy server.
As discussed in other post (see tortoise svn giving me "Redirect cycle detected for URL 'domain/svn'" ), this error occurs if the SVN DAV is misconfigured, e.g., using SVNParentPath where one should use SVNPath. However, my configuration appears to be correct and - as far as I know - the problem only occurs when behind a proxy.
The setup of the repository is more or less standard, e.g.,
ServerAlias svn.mydomain.com <Location /myrepo> DAV svn SVNPath /var/www/vhosts/mydomain.com/svn/myrepo AuthType Basic AuthName "mydomain svn" AuthUserFile /var/www/vhosts/svn.mydomain.com/conf/htpasswd-myproject # Allow read-only access to anyone, otherwise require # require authentication Require valid-user </Location>
(I given an answer to my own question, after using half a weekend to search for the solution):
It appears as if this error message is related to the fact that the subversion repository is located in a directory svn/myrepo
where the directory svn
is also listed as the DocumentRoot of the subdomain svn.mydomain.com
. That DocumentRoot directive was not obvious to me, since the document root of the subdomain was configered in a different conf file (I am using Plesk to maintain the server).This created some kind of ambiguity. Once I moved the document root of the subdomain to a different location, the error message went away.
The problem was hard to track down, because - as far as I know -
The error does not appear if the repo is located at the top level of the subdomain, i.e.
<Location />
andSVNPath /var/www/vhosts/mydomain.com/svn
in the above configuration.The error only shows up if the repo is accessed via a proxy.
The clash with DocumentRoot was not so obvious, because it was a subdomain.
So to summarize: the solution (when using Plesk): Change the "DocumentRoot" of the subdomain in the Plesk setup (GUI) to something different form the SVN directory. The "DocumentRoot" of www.mydomain.com is httpdocs
. The "DocumentRoot" of svn.mydomain.com was (by default) svn
. I changed that to httpdocs-svn
and the problem was gone. The folder httpdocs-svn
isn't used in my setup since everything below svn.mydomain.com is handled by DavSVN.
这篇关于“svn: E195019: Redirect cycle detection for URL"的原因是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!