What is the cause of “svn: E195019: Redirect cycle detected for URL”?

那年仲夏 提交于 2019-12-03 02:34:39

(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 /> and SVNPath /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.

bemaldo

Make sure the link you are using is the 'svn' and not the 'view' link.

i.e. www.myrepo.com/svn/myproject/trunk ||correct
www.myrepo.com/view/myproject/trunk ||incorrect

That should work.

I was facing similar kind of error following this tutorial: How to Install SVN Server on Ubuntu 18.04 & 16.04 LTS. Later realized, I have to delete the following line in Step 3

Alias /svn /var/lib/svn

In my case the problem is there was a non compatible settings between to configuration files on ubuntu.

I have ubuntu 18.04 and Apache2 and the lastest svnserver from ubuntu and to solve the problem of redirecting i had to remove Alias from two different configuration files: /etc/apache2/mods-enabled/dav_svn and /etc/apache2/site-enabled/default-ssl.conf

/etc/apache2/mods-enabled/dav_svn

 #Alias /svn /svn_repo/svn
 <Location /myrepo>
    DAV svn
    SVNPath /svn_repo/svn
    AuthType Basic
    AuthName "Subversion Repository"
    AuthUserFile /mypath/dav_svn.passwd
    Require valid-user
    AuthzSVNAccessFile /etc/apache2/dav_svn.authz
</Location>

/etc/apache2/site-enabled/default-ssl.conf

 #Alias /svn /svn_repo/svn
 <Location /myrepo>
    DAV svn
    SVNPath /svn_repo/svn
    AuthType Basic
    AuthName "Subversion Repository"
    AuthUserFile /mypath/dav_svn.passwd
    Require valid-user
    AuthzSVNAccessFile /etc/apache2/dav_svn.authz
</Location>

obviusly after modification i need to restart apache:

sudo service apache2 restart

The problem is with the SVN URL which you gave during check-out. I checked various post for this problem but none of them worked for me. Below is the very simple solution that worked for me,

You need to you csvn repository using link 'http://localhost:3343/csvn/repo/list ' and copy the URL of 'Checkout command' for the repository which you want to access.

This URL you need to use in the tortoise SVN client for checkout.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!