How to Configure LDAP Authentication for Subversion on CentOS 5.5

In this post, i will show you on how to configure your existing subversion with LDAP authentication. This guideline assume that you are already configure the Apache and subversion with htpasswd user. 389 LDAP has been installed but not yet configure in your subversion configuration file.

Prerequisite :
a)How to Install Apache Httpd Web Server on Linux
b)How to Install Subversion 1.6.16 on CentOS 5.5 Server
c)How to Install 389 Directory Server on CentOS/RHEL

1. Locate and open subversion.conf using vi editor

    [root@server ~]# vi /etc/httpd/conf.d/subversion.conf

2. Modify the existing subversion.conf to below:

    # Needed to do Subversion Apache server.
    LoadModule dav_svn_module     modules/
    # Only needed if you decide to do "per-directory" access control.
    LoadModule authz_svn_module   modules/
    # Example location directive.
    <Location /svn/repos>
            DAV svn
            SVNParentPath /svn/repos
            AuthBasicProvider ldap
            AuthType Basic
            AuthzLDAPAuthoritative on
            AuthName "My Subversion server"
            AuthLDAPURL "ldap://ldap.intranet.local:389/DC=intranet,DC=local?uid?sub?(objectClass=*)" NONE
            AuthzSVNAccessFile /svn/permissions/svnaccess
            Require valid-user

3. Save configuration file and restart the apache server.

    [root@server ~]# service httpd restart
    Stopping httpd:                                            [  OK  ]
    Starting httpd:                                            [  OK  ]


1 Comment

  • Avatar Ashish Shinde says:

    Thanks.. it really worked..

    But I have little issue..
    I have kept SVN repo in other HDD say in /data1 path.. /data1/svn/testrepo.. but I am getting Forbidden error..
    they I make chown -R apache:apache /data1 all is showing apache owner.. still getting forbidden.. can you please reply..Thanks in advance & very nice tutorial. 

Leave a Reply

Your email address will not be published. Required fields are marked *