Installing Apache HTTP Server on Windows

I am setting up a machine to host Subversion. My preference is to use Apache as the HTTP server. The server is running Vista but the install and set up process should be similar on other versions of windows.

Download
The latest Apache build (currently apache_2.2.9-win32-x86-no_ssl-r2.msi) from http://httpd.apache.org/download.cgi

Install Apache
Run the installer and follow the instructions. Enter the server name under ‘Network Domain’ and ‘Server Name’, enter an email address and leave ‘for All Users’ selected.
ApacheInstall

Navigate to http://localhost/ and you should see the text ‘It works!’.

I prefer to run IIS on port 80 and Apache on 81. If you already have IIS installed and running you may not have got the ‘It works!’ page but rather an IIS page when running the test above.

Change to Port 81
'Start > All Programs > Apache HTTP Server 2.2 > Configure Apache Server > Edit the Apache httpd.conf Configuration File'

Search for  'Listen 80' and replace with 'Listen 81'

Save the conf file and restart the service from the services console then browse to http://localhost:81/ to confirm it works.

Create a Password File
Open a command prompt at C:\Program Files\Apache Software Foundation\Apache2.2.

Create a password file by entering 'bin\htpasswd -c passwd username' and enter and confirm the password when prompted.

Add any further users with 'bin\htpasswd passwd username'.

Edit the Apache httpd.conf configuration file and change:

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

To:

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    AuthType Basic
    AuthName "Subversion Repositories"
    AuthUserFile passwd
    Require valid-user
</Directory>

Restart the Apache 2.2 service and confirm you are asked for a username and password when you navigate to http://localhost:81/.

You may need to amend your firewall to allow connections from port 81.
ApacheWindowsFirewall

Previous
Previous

Installing Subversion on Windows

Next
Next

Vista "Windows Complete PC Restore" fails with "No valid backup locations could be found"