Install Subverison 1.5
Download and unzip Subversion 1.5 binary built for Apache 2.2 (svn-win32-1.5.4.zip) from here
Install Apache 2.2
Download and install Apache 2.2 (apache_2.2.9-win32-x86-openssl-0.9.8h-r2.msi)
Integrate Subversion 1.5 with Apache 2.2
Enable SVN modules
* Copy from Subversion/bin directory to the Apache/modules directory.
mod_dav_svn.so
mod_authz_svn.so
* Add the Subversion/bin directory to the SYSTEM PATH so all the Subversion support dll’s are visible to the Apache service.
* Edit the Apache configuration file (httpd.conf)
Uncomment:
#LoadModule dav_fs_module modules/mod_dav_fs.so #LoadModule dav_module modules/mod_dav.so
Add:
LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so
Use LDAP authentication
<Location /svn> DAV svn SVNPath your/repository/path #Use SVNParentPath if multiple svn repositories Order allow,deny Allow from all AuthType Basic AuthBasicProvider ldap AuthName "Subversion login" AuthzLDAPAuthoritative on #OpenLdap #AuthLDAPURL ldap://coe-soa-4/ou=Users,dc=example,dc=com #AuthLDAPBindDN "cn=Manager,dc=example,dc=com" #AuthLDAPBindPassword "secret" #Active directory note port 3268 NOT 389 #AuthLDAPURL "ldap://adserver.company.com:3268/DC=company,DC=com?sAMAccountName?sub?(objectClass=user)" #AuthLDAPBindDN ldap-auth-user@company.com #AuthLDAPBindPassword "the_password" Require valid-user </Location>
Use local files for authentication
Add to httpd.conf
<Location /svn> DAV svn #SVNPath c:\path\to\repo #Use SVNParentPath if multiple svn repositories SVNParentPath C:\path\to\repo AuthType Basic AuthName "SVN Repository" AuthUserFile passwd AuthzSVNAccessFile authz Require valid-user </Location>
Create passwd File
* Create passwd file
cd %Apache2% bin\htpasswd -c passwd
* Add additional users
bin\htpasswd passwd
Create authz File
# Define some project groups [groups] project1-developers = user11, user12, user13 project2-developers = user21, user22, user23 # project1 usrs have read and write access to path1 and all sub folders [path1:/] @project1-developers = rw # project2 users have read and write access to path2 and sub folders # under the path 1 foler [path1:/path2] @project2-developers = rw
Restart Apache
Don’t forget to restart Apache.