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:
- Download binaries
- Install Apache
- Configure
- 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