Installing Subversion
- Download Microsoft Visual C++Download
- Download TortoiseSVN Download
- Install Microsoft Visual C++
- Install TortoiseSVN, making sure to enable the command line client tools option
Installing and Configuring Apache HTTPD
- Download Apache HTTPD Download
- Download Subversion Apache Modules Download
- Extract the downloaded .zip files
- Copy the extracted Subversion files to the desired location, for example C:\Program Files\Subversion
- Click the Start button > Search Control > Click Control Panel
- Click on System > Advanced system settings
- Click the Environment Variables...
- Edit the System Path variable
- Add the Subversion /bin path
- Click OK
- Open a command prompt and run svn --version to confirm the Subversion executables are configured in the system path correctly
- Copy the following files from the extracted Subversion directory to the Apache installation directory specified below:
Apache /modules
mod_dav_svn.so
mod_authz_svn.so
deps/brotlicommon.dll
deps/brotlidec.dll
deps/brotlienc.dll
deps/libapr-1.dll
deps/libapriconv-1.dll
deps/libaprutil-1.dll
deps/libcrypto-1_1-x64.dll
deps/libexpat.dll
deps/libhttpd.dll
deps/libserf-2.dll
deps/libssl-1_1-x64.dll
deps/zlib1.dll
Apache /bin
libsvnjavahl-1.dll
libsvn_client-1.dll
libsvn_delta-1.dll
libsvn_diff-1.dll
libsvn_fs-1.dll
libsvn_fs_fs-1.dll
libsvn_fs_util-1.dll
libsvn_fs_x-1.dll
libsvn_ra-1.dll
libsvn_repos-1.dll
libsvn_subr-1.dll
libsvn_wc-1.dll - Inside the extracted Apache file structure, navigate to /conf/httpd.conf and edit it with a text editor
- Find the following lines LoadModule dav_module modules/mod_dav.so and uncomment them by removing the # at the beginning
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule dav_module modules/mod_dav.so - Add the following block to the file:
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so<VirtualHost svn.i12bretro.local:80>
ServerName svn.i12bretro.local
ServerAlias i12bretro.local
DocumentRoot E:\SVN_Repos
<Location />
DAV svn
SVNListParentPath On
SVNParentPath E:\SVN_Repos
Order allow,deny
Allow from all
</Location>
</VirtualHost> - Save the changes
- To just start Apache and have it run, double click the httpd.exe in the Apache /bin directory
- To run Apache as a Windows server, hold the shift key and right click in the Apache /bin directory > Open command window here
- Enter the following command to create the Apache service:
httpd.exe -k install -n "Apache HTTPD"
- Open a web browser and navigate to http://svn.i12bretro.local
- A bare bones directory listing of the "Collection of Repositories" should be displayed
Setting Up LDAP Authentication
- Navigate to the Apache install directory/conf in Explorer
- Edit httpd.conf in a text editor
- Find both the authnz_ldap_module and ldap_module and make sure it is enabled by removing the # at the start of the line
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule ldap_module modules/mod_ldap.so - Add the following to the Location block created earlier for svn.i12bretro.local to enable LDAP authentication
Order deny,allow
# Basic authentication with LDAP against MS AD
AuthType Basic
AuthBasicProvider ldap
# AuthLDAPURL specifies the LDAP server IP, port, base DN, scope and filter
# using this format: ldap://host:port/basedn?attribute?scope?filter
AuthLDAPURL "ldap://i12bretro.local:389/DC=i12bretro,DC=local?sAMAccountName?sub?(objectClass=user)" NONE
# The LDAP bind username and password
AuthLDAPBindDN "readonly_svc@i12bretro.local"
AuthLDAPBindPassword "Read0nly!!"
LDAPReferrals Off
AuthUserFile /dev/null
AuthName "Restricted Area [i12bretro.local]"
# to authenticate a domain group, specify the full DN
AuthLDAPGroupAttributeIsDN on
require ldap-group CN=WebAuthAccess,CN=Users,DC=i12bretro,DC=local - Save httpd.conf
- Restart the Apache service
- Open a web browser and navigate back to http://svn.i12bretro.local
- An authentication prompt should be displayed
- Enter a valid username and password for a user belonging to the group specified above
- A bare bones directory listing of the Subversion repositories should be displayed