Skip to main content

Using Apache to display a list of available Subversion repositories

If you have setup Apache to be able to serve multiple Subversion repositories from one parent Subversion path then you are probably wondering if there is a way to display the list of repositories available in that parent directory.

By default Apache will give you a 403 permissions error reporting:
403 Forbidden

You don't have permission to access /parent-subversion-directory on this server.
To enable the repository listing you need to use the SVNListParentPath option (see "Listing available repositories in mod_dav_svn (server)" under "Enhancements and Bugfixes" in the 1.3 release notes) in the Apache virtual host setup.
Note: this will only work in Subversion 1.3 and higher.

Edit your Subversion Apache configuration file to add the SVNListParentPath On line, an example is given below:
# Subversion
<Location "/svn">
DAV svn
SVNParentPath /svn
SVNListParentPath On
SVNIndexXSLT "/svnindex.xsl"
</Location>
If you now visit http://some-website.com/svn you will see a page entitled "Collection of Repositories" with a listing of links pointing to each Subversion repository!

Technorati Tags: , , ,

Comments

Anonymous said…
Handy! I'd just installed SVN over HTTP yesterday, as it happens, and had noticed the lack of top-level directory listings with SVNParentPath in use.

However, SVNListParentPath doesn't seem to sit well with mod_authz_svn - despite having a global read rule set up ([/]: *=r), I now get 401 authorisation requests for my top level directory rather than 403s :-(
Andrew Beacock said…
I did a quick search for your issue and found this:

http://svn.haxx.se/dev/archive-2006-01/0421.shtml

It talks about adding a trailing slash to the end of the Location stanza.

Please let me know if this fixes your problem and I'll add another post about it to make it easy for people to find.

Good luck!
Anonymous said…
This has absolutley nothing to do with the topic at hand, but I just thought you might be interested:

I noticed a couple of your more popular posts deal with instantly generating Technorati, del.icio.us, and Ice Rocket tags without the hassle of manually typing the code.

Check out: http://www.keotag.com/tagger.php for an excellent program that does just that, very quickly, easily, and accurately!

I just thought you and your readers would be interested. Keep up the great work.
Anonymous said…
Work fine!!!!!!!!!!!!
Thanks!!!!!!!!