1. Suppose you have already installed subversion, you need create a repository
svnadmin create "d:\svn\repository2"
2. install Apache Server, I used httpd-2.2.17-win32-x86-no_ssl.msi. Install it D:\Apache Software Foundation\Apache2.2
3. open D:\Apache Software Foundation\Apache2.2\httpd.conf, add the following at the end of the file
#load moules for svn
LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module "D:/svn/bin/mod_dav_svn.so"
LoadModule authz_svn_module "D:/svn/bin/mod_authz_svn.so"
# Configure Subversion repository
<Location /repository2>
DAV svn
SVNPath "D:\svn\repository2"
AuthType Basic
AuthName "Subversion Repository2"
AuthUserFile "D:\svn_conf\passwd"
Require valid-user
AuthzSVNAccessFile D:\svn_conf\svn-acl
</Location>
4. create folder D:\svn_conf
cd D:\Apache Software Foundation\Apache2.2\bin
htpasswd -cm d:\svn_conf\passwd Sam
this is create an encrypted password for user "Sam", it will prompt your to enter password.
If you want to add another, htpasswd -m d:\svn_conf\passwd haibo
Be noted, we are not using -c option here, otherwise, it will remove user Sam.
Then create D:\svn_conf\svn-acl, this file will define which users have what access.
[repository:/]
Sam = rw
* = r
[repository2:/]
Sam = rw
* = r
You can see here, we give user "Sam" write access to both repository and repository2.
5. Apache is using 80 as the default port, if this port is already used, you could change it to 8181 by changing in D:\Apache Software Foundation\Apache2.2\httpd.conf,
Now, start Apache Sever, your url should be:
http://localhost:8181/repository2/