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
  1. Ashish Shinde
    Ashish Shinde
    August 27, 2012 at 6:49 pm

    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 *

A world leading hosting company that provides fully-managed innovative and secure solutions, suitable for hosting small to medium-sized websites

Built on the best available technologies combined with Google Cloud for strong redundancy and application availability. Backed by skilled experts to address web security threats, a devops team to create advanced custom security solutions, and 24/7 sysadmins to watch over the platform. This powerful, hands-on approach makes your sites faster, safer, and easier to manage. Starting from only $3.95/mo.


* up to 30 days money back guarantee