Install
Links
Sample
httpd.conffor Subversion with all features in this file:../../misc/howto/apache/http/subversion-httpd.conf
Windows
Prerequisites
To install Subversion with SSL on Apache:
Follow the Apache install instructions, Install.
Download and Install
Download
Setup-Subversion-1.6.4.msifrom http://subversion.tigris.org/getting.html#windowsInstall. I installed to:
C:\tools\Subversion\
Apache - Configuration
Copy
bin/mod_dav_svn.soto the Apachemodulesfolder.Add the following to your Apache
httpd.conffile:LoadModule dav_module modules/mod_dav.so LoadModule dav_svn_module modules/mod_dav_svn.so
Note: You need both of these modules if
mod_davwas compiled as a shared object (instead of statically linked directly to thehttpdbinary).Add the following to your Apache
httpd.conffile:<Location /svn> DAV svn SVNParentPath /repository/svn </Location>
Note: This configuration will support multiple Subversion repositories in the
/repository/svnfolder. Use theSVNPathdirective to support a single repository.Re-start Apache. You should now be able to browse to your repositories. e.g. to access a repository in
\\repository\svn\\myrepo-svn, browse to http://localhost/svn/myrepo/.Note: Don’t forget the trailing slash…
The above configuration will give you a public Subversion repository accessible over http. Any person who has access to the Apache server will be able to checkout and commit without authentication.
Apache - Authentication (Digest)
Create a password file (and the first user):
htdigest - manage user files for digest authentication
\tools\apache2.2\bin\htdigest -c \repository\apache\password\svn.htdigest "Subversion Repository" patrickk
Note: After the first user, you don’t need the “
-c” option any more:\tools\apache2.2\bin\htdigest \repository\apache\password\svn.htdigest "Subversion Repository" sams
Note: The
realmspecified as the second parameter in thehtdigestcommand (in this example,Subversion Repository) must match the value in the ApacheAuthNamedirective (see below).Update the Apache
conf/httpd.conffile:LoadModule auth_digest_module modules/mod_auth_digest.so LoadModule authn_file_module modules/mod_authn_file.so LoadModule authz_user_module modules/mod_authz_user.so <Location /svn> DAV svn SVNParentPath /repository/svn AuthType Digest AuthName "Subversion Repository" AuthDigestDomain /svn/ AuthUserFile /repository/apache/password/svn.htdigest Require valid-user </Location>
Apache - SSL
Copy the instructions in SSL Certificate, SSL - Certificate
Completing this step should allow you to access your Subversion repository using SSL and non-SSL connections.
To secure the Subversion repository so it can only be accessed through SSL, add the
SSLRequireSSLdirective to the Apacheconf/httpd.conffile:<Location /svn> DAV svn SSLRequireSSL SVNParentPath /repository/svn AuthType Digest AuthName "Subversion Repository" AuthDigestDomain /svn/ AuthUserFile /repository/apache/password/svn.htdigest Require valid-user </Location>