RikWare
...

Setup Apache-Subversion on Windows XP - Part 2 - SSL

Friday, 24 November 2006 12:53 by admin

Here's part two of my Apache-Subversion setup process. This time we're setting up SSL on the server.

1. Generate SSL Certificates

First up we need to generate some certificates for the system. Although OpenSSL came with the Apache install, it doesn't include all the necessary config files by default so the easiest way I found was to download a separate set of binaries which run straight out of the box. Grab OpenSSL from http://www.slproweb.com/products/Win32OpenSSL.html and install it.

The certificates are generated through the following commands:

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

Fill in the appropriate info when prompted. Make sure that when you're prompted for the Common Name (eg, your websites domain name) you put in the address of the server (e.g., www.rikware.com). Note that these certificates are of course not signed by a certificate authority so you will be warned when visiting the site that they may be insecure. You can avoid this by distributing the server.crt file to your clients separately. Alternatively get the certificates signed properly, but I'm not going in to how that is done. Check out http://raibledesigns.com/wiki/Wiki.jsp?page=ApacheSSL for some more info.

You should now have a server.crt and server.key file. Copy those to the /Apache/conf/ssl.crt/ and /Apache/conf/ssl.key/ directories (you'll need to create the directories yourself.

2. Config

Open up /Apache/conf/ssl.conf and replace "c:/apache" with "C:/Program Files/Apache" (or wherever you've installed Apache. Also uncomment (remove the '#') the lines <IfDefine SSL> and </IfDefine>.

If you want to move SSL from the default port then search for "443" and replace it with the new port.

Open up /Apache/conf/httpd.conf and uncomment the following lines:

  • LoadModule ssl_module modules/mod_ssl.so
  • <IfModule mod_ssl.c> and the </IfModule> just below.

3. Test

Start up Apache and try browsing to https://localhost/. You should get the Apache default page again after an SSL.

Next time - Adding Subversion support to Apache.

Categories:   Programming
Actions:   E-mail | del.icio.us | Permalink | Comments (11) | Comment RSSRSS comment feed

Setup Apache-Subversion on Windows XP - Part 1

Friday, 24 November 2006 02:53 by admin

I recently needed to expose a subversion server publicly. Unfortunately I couldn't find any way of getting the svn+ssh protocol working with a windows server (at least not without having some complex setup on each client which I wasn't happy with). So instead I setup an Apache server to expose it via https. Since this required pulling in info from a few different sites I thought I'd list my setup process along with links to all the appropriate windows binaries.

So here we go - Setting up an Apache-Subversion server on Windows XP with SSL Support, Part 1: Apache.

Here's what's coming up:

  1. Download binaries
  2. Install Apache
  3. Configure
  4. Test

1. Download Binaries

Although you can grab an Apache build for windows off the Apache site, it doesn't include support for SSL. To grab one with SSL support visit http://hunter.campbus.com/ and grab the zipped version of Apache 2.0 (not 2.2 - Subversion does not work with Apache 2.2 at this stage). Currently it's Apache_2.0.59-Openssl_0.9.8d-Win32.zip but of course grab the latest version.

2. Install

Extract the zip somewhere appropriate. I like C:/Program Files/Apache/ so that's what I'll assume for the rest of this series.

3. Configure

Now the important bit. Open up Apache/conf/httpd.conf in your favourite text editor.

  • Do a quick search and replace to replace "c:/apache" with "C:/Program Files/Apache".

Apache is set to listen on port 80 by default. If you'd like to move it somewhere else do the following:

  • Find "Listen 80" and replace it with "Listen 8080"
  • Replace "ServerName localhost:80" with "ServerName localhost:8080"

4. Test

We should be ready to go at this stage. Run "Apache/bin/Apache.exe" and look for any errors. If everything is going well then you should just get an empty command prompt. Fire up you web browser and test http://localhost:8080/ (assuming you changed the port to 8080). If everything works correctly then you should get the apache default page.

Sidebar - Apache Service

At this stage close down apache and run Apache/bin/Apache -k install to install the apache service. You can then start it up either through the control panel services applet or run Apache/bin/Apache -k start. If you follow on and setup SSL support in Apache it's probably best to keep testing with the command line version.

Next time - Setting up SSL

Categories:   General
Actions:   E-mail | del.icio.us | Permalink | Comments (1) | Comment RSSRSS comment feed

Codename RikReader released

Wednesday, 1 November 2006 17:12 by admin

My old partner in crime, Doug, has released RikReader. I'd love to say I contributed more than some beta testing and part of the name but unfortunately it's all Doug's good work. Hopefully I'll find some time to release a nice little addon utility for RikReader which we've been talking about. I won't say what because I probably won't find the time and it will never eventuate :(

Categories:   Programming
Actions:   E-mail | del.icio.us | Permalink | Comments (1) | Comment RSSRSS comment feed