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

(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.


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 5

Alias /svn /var/lib/svn