Simplification of Apache+Subversion multidirectory configuration

Posted by Reinderien on Server Fault See other posts from Server Fault or by Reinderien
Published on 2011-01-07T15:10:35Z Indexed on 2011/01/07 15:55 UTC
Read the original article Hit count: 223

Filed under:
|

Hello. With your excellent advice, I've finally pieced together this functional Apache configuration for my Subversion service:

# Macro to make an SVN repo set
<Macro SVNDir $user>
    <Location /svn/$user>
        # Mandatory HTTPS, log in using Active Domain
        SSLRequireSSL
        AuthPAM_Enabled on
        AuthType Basic
        AuthBasicAuthoritative off
        AuthName "PAM"
        Require user AD\$user

        # Needed to squash spurious error messages
        AuthUserFile /dev/null

        # SVN stuff
        DAV svn
        SVNParentPath /var/www/svn/$user
    </Location>
</Macro>

# List of accounts
Use SVNDir user1
Use SVNDir user2
# ...

It works, but it isn't optimal. I'd like to somehow redo this so that it can just scan the list of directories in /var/www/svn and automatically do this for each of them. Is that possible?

Thanks.

© Server Fault or respective owner

Related posts about apache

Related posts about svn