Hi all, The SVNParentPath directive allows a set of repos to be placed at an URL, but if you have more complex needs such as providing many customers (with separately mounted home directories) access to many repositories, this may not be enough.
The attached patch brings httpd v2.4 expression support to the SVNPath and
SVNParentPath directories through the addition of an optional second parameter,
which allows you to do stuff like this:
<LocationMatch ^/svn/(?<CUSTOMERNAME>[^/]+)/>
# customer has their own partition, inside is an “svn” directory with
repos in it
SVNParentPath /home/partition %{env:MATCH_CUSTOMERNAME}/svn
# customer repos are protected by this group
require ldap-group
cn=https://svn.${SERVER_SUFFIX}/%{env:MATCH_CUSTOMERNAME},ou=svn,ou=Groups,o=Somewhere
</LocationMatch>
Or perhaps this based on the HOST header (and a wildcard SSL cert):
<Location />
# customer has their own partition, inside is an “svn” directory with
repos in it
SVNParentPath /home/svn %{HTTP_HOST}
# customer repos are protected by this group
require ldap-group cn=%{HTTP_HOST},ou=svn,ou=Groups,o=Somewhere
</Location>
Both the SVNPath and SVNParentPath directives now take an optional second
argument, containing a string expression to be evaluated and added to the end
of the primary path. If the expression evaluates to a path above the first
argument, an error will be returned.
The patch was developed against trunk, and applies clean to v1.7.19.
Regards,
Graham
—
subversion-1.7.19-expression.patch
Description: Binary data

