Want to show your appreciation?
Please a cup of tea.

Sunday, March 12, 2006

Managing Multiple Projects with Subversion

Planning to add a number of projects to my newly installed subversion. Found links below to be very useful:

Wednesday, March 08, 2006

Subversion with ApacheSSL on Win32

After getting Apache2 + SSL running sucessfully, I started to install subversion.

Install Subversion

Download 1.3.0 installer (the setup.exe version) from http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91 and run the executable. The installer not only installed Subversion but also modified the Apache http.conf file by adding two modules and restarted the Apache server.

Create Subversion Repository

Launch a command prompt and run this: svnadmin create c:\svnrepo

Import Source into repository

svn import "C:\path\to\project" file:///svnrepo -m "initial import"

Link apache to repository

Add location directive to the https virtual host in the ssl.conf file.

<location>
  DAV svn
  SVNPath "C:/svnrepo"
</location>

Restart the Apache server and launch browser to https://www.my-site.com/svn/

Enforce security

Go to Apache's conf directory and run command below to create two user account. Note: the first command has -c option to create the password file.

..\bin\htpasswd -cm svn-auth-file user1
..\bin\htpasswd -m svn-auth-file user2

Edit the ssl.conf file to change the section we just added as below.

<location>
  DAV svn
  SVNPath "C:/svnrepo"
  AuthType Basic
  AuthName "Subversion repository"
  AuthUserFile "conf/svn-auth-file"
  Require valid-user
</location>

Final Restart

Restart the Apache server and launch the browser. We did it!

Apache2 + SSL + Win32

I have been following the instructions posted here by Raible to get Apache2SSL running on Win32. Well, there were something extra that I had to do to get it working finally.
  1. Download precompiled Apache2 binary with SSL module from http://hunter.campbus.com/ and extract them to
    C:\Program Files\Apache2
    .
    You can place it anywhere in your drive.
  2. Find two ddl files ssleay32.dll and libeay32.dll in the installation directory and copy them to
    %SYSTEMROOT%/system32.
  3. Followed the instruction to create the test cert. I have cygwin so it was simple the only difference is that I didn't need to use -config option.
    • openssl req -new -out server.csr
    • openssl rsa -in privkey.pem -out server.key
    • openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 3650
  4. Create a subdir called ssl.crt under conf and place the genereated file server.crt and server.key there.
  5. edit httpd.conf file (The instruction on Raible's site didn't work for me on this part):
    • Uncommented this line LoadModule ssl_module modules/mod_ssl.so
    • Replaced all c:/apache with the installation directory. (Note that I use forward slash)
    • Removed line <IfModule mod_ssl.c> and it's closing tag to force include ssl.conf.
  6. edit ssl.conf
    • Removed line <IfDefine SSL> and it's closing tag to force SSL
    • Replaced all c:/apache.
    • Changed ServerName to your site name. Changed ServerAdmin too but should have no impact.
Start Apache and test, it works now! My next task is to get Subverion working with ApacheSSL on Win32...