Tuesday, October 20, 2009

Installing Secure SVN Server on Windows

I set out to set up a SVN server on Windows with secure authentication.

I started out with setting svn server as per http://www.codinghorror.com/blog/archives/001093.html. Then I followed http://turnleft.inetsolution.com/2007/07/how_to_setup_subversion_apache_1.html.

In the middle I got stuck with htpasswd command as it would not execute, saying "Illegal character :". Something to do with the file path. So I installed cygwin, including openssl (followed http://daveonsoftware.blogspot.com/2007/06/installing-cygwin-with-openssl-package.html). After this the htpasswd command worked fine.

Then, as per http://raibledesigns.com/wiki/Wiki.jsp?page=ApacheSSL I set up apache with ssl.

I tried to start Apache, but won't. In Event Viewer I saw it returned error code 1. As per http://www.issociate.de/board/post/474531/2.2.6_won%27t_start_-_The_Apache2.2_service_terminated_with_service-specific_error_1_%280x1%29..html I debugged httpd.exe using command line. It said "DAV is not allowed here". The following configuration (amendment over the "turnleft" solution above) worked (I have replaced SVNParentPath by SVNPath too):

<location /svn>
DAV svn
SVNPath C:/svn/repository
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile conf/svn-passwd.pass
AuthzSVNAccessFile conf/svn-authz.conf
Require valid-user
</location>

No comments: