Reputation: 4272
I'm migrating from Visual SVN on a Windows machine to SVN served via Apache on a Linux machine. So far mostly successfully. I can access the repositories via svn
on the command line from multiple machines and browse the repository contents if I put in the full URL of an individual repository into a web browser. It also properly requires authentication.
When I go to the root directory (/svn
) in the browser, however, I'm getting an empty listing of repositories. I have found a lot of posts across the internet on the situation where the listing is blocked, i.e. you get an HTTP 403 instead of a listing, but that is not my case. I'm getting a list - it just happens to be empty. That shows in the browser as a well-formed page with nothing between the <ul></ul>
tags that would have the contents, and it shows in the Apache logs as a successful (HTTP 200) response given.
So the question is why this happens and how to fix it?
Configuration:
<VirtualHost *:80>
ServerName svn.example.com
Alias /svn /var/lib/svn
<Location /svn>
DAV svn
SVNParentPath "/var/lib/svn/"
SVNListParentPath On
AuthType Basic
AuthName "My Software Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
</Location>
RedirectMatch ^/$ /svn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
There are multiple virtual hosts on this machine. I've shown just the section for the SVN host.
This is the HTML returned when I navigate to svn.example.com/svn
in a browser (after authenticating):
<html><head><title>Collection of Repositories</title></head>
<body>
<h2>Collection of Repositories</h2>
<ul>
</ul>
<hr noshade><em>Powered by <a href="http://subversion.apache.org/">Apache Subversion</a> version 1.9.5 (r1770682).</em>
</body></html>
Prior to adding the SVNListParentPath on
section, I would received instead an HTTP 403, and, to emphasize, that's the case that I see most often addressed here and elsewhere. But that is not my case.
Upvotes: 2
Views: 622
Reputation: 4272
Removing the line Alias /svn /var/lib/svn
seems to have fixed the problem without causing any new issues.
I found this by accident dealing with a "redirect cycle", which is addressed by one of the answers to this other question that is otherwise unrelated: What is the cause of "svn: E195019: Redirect cycle detected for URL"?
Upvotes: 1