SVNListParentPath on配置以及在根目录显示项目列表

I'm one of those people around waiting for a clean solution for this issue.  For
now, I'd like to summarize two workarounds that work for me:

1) When Location is not the root (i.e., base = http://www.site.com/repos):

    RedirectMatch ^(/repos)$ $1/

    <Location /repos/>
        DAV svn
        SVNParentPath ...
        SVNListParentPath on
        ... security limitations ...
    </Location>

Notice (as stated by the bug reporter) that the 'Location' address must have a
trailing slash.  The 'RedirectMatch' statement helps the user if he forgets (or
doesn't know about) the need for the trailing slash in the URL.

2) When Location is the root (i.e., base = http://svn.site.com/):

This one is tricky:

    <Location />
        DAV svn
        SVNParentPath ...
        SVNListParentPath on
        Order deny,allow
        Allow from all
    </Location>

    <LocationMatch /.+>
        DAV svn
        SVNParentPath ...
        ... security limitations ...
    </LocationMatch>

Yes, this *is* ugly.  At least it works for me.  The key here is that the
'Location' section matches only http://svn.site.com/.  Since there is no
AuthzSVNAccessFile, the bug isn't raised (be careful that the above
configuration "as is" allows *everyone* to access the repository list).  The
'LocationMatch' matches everything but the root: here comes AuthzSVNAccessFile
and other security measures.  Also, SVNListParentPath is useless in the second
section, as it's never triggered.

I've managed to enable SVNListParentPath with authentication when Location is root:

  <Location />
    DAV svn
    SVNParentPath /path/to/svnroot
    SVNListParentPath On
  </Location>

  <LocationMatch /.+>
    # DON'T PUT DAV or SVNParentPath here
    AuthzSVNAccessFile ....
    Require ...

 

 

http://subversion.tigris.org/issues/show_bug.cgi?id=2753

你可能感兴趣的:(SVN,list,user,Security,Authentication,Access)