Update February 2013
As you might notice, Apache.org site does not provide Win32 binaries anymore, so if you want to run Apache http server on Windows OS with the latest version you can get them from http://www.apachelounge.com
But the sources are available only in zip format, so like it or not, you have to install them manually, but don't worry I have created an article called "Manually Installing Apache on Windows 7"
Download the Win32 Binary (MSI Installer) as follows.
Once you've finished downloading the Apache MSI Installer, double click the file to start the installation.
Read the License Agreement - If you have no problem with it check "I accept the terms in the license agreement," then click Next.
Fill in the following:
Network Domain: localhost
Server Name: localhost
Administrator's email address: admin@localhost
Check for All User on Port 80 as a service. Click Next.
Select "Custom" for the Setup Type and then click Next
Click "Change" to change the destination folder. As an example we are going to install the Apache Server into "C:\Apache", later we will install PHP and MySQL in the same folder as well, so it'll be more easier to manage (upgrade) later.
Create a new folder in C drive name it "Apache" or you could just type in "C:\Apache\" in the "Folder name" and then click OK.
Once we've changed the destination folder, it should be look like the image above. Click Next to continue.
Now we're ready to install the Apache Server. If there is something you want to change we still have a chance to go back by clicking the Back button otherwise click Install.
Wait a few moments until Apache Server fully installed. Click "Finish" to exit the installation.
An icon (Apache Monitor) will appear in the System tray icons as shown below. Left click the icon to stop, to start and to restart the Apache Server.
Don't forget to always restart Apache Server each time we edit or make any changes in the Apache Configuration file (httpd.conf).
Now it's time to test our server, open up browser in the address bar type in "http://localhost/" or "localhost" and hit Enter.
Yes! It works, congratulations!
Changing Apache Document root
Next we'll make a few changes to the Apache Configuration file (C:\Apache\conf\httpd.conf) or we can access it from the Start Menu > All Programs > Apache HTTP Server 2.2 > Configure Apache Server > Edit the Apache httpd.conf Configuration File.
Create a new folder in D drive name it "My Websites" or you can create it in C drive if you don't have a D drive.
Open up Apache configuration file "httpd.conf"
Find the line below:
Change the path to D:/My Websites, we've just created.
DocumentRoot "D:/My Websites"
Find the next line:
Change it to the same path with the Document Root:
<Directory "D:/My Websites">
Open up Notepad, copy and paste the code html below:
<html><body><h1>It works too</h1></body></html>
Save the file into D:\My Websites as "index.html" don't forget to change "save as type" with "all files" otherwise the file will become index.html.txt
Restart the Apache Server. Open up browser type in "http://localhost/" and then press Enter.
Yes! It works too, again congratulations!
If "http://localhost" or "localhost" is not working, try "http://127.0.0.1" If the latter works, open hosts file with Notepad. The hosts file is located at "C:\Windows\System32\drivers\etc\hosts" and add the following line to the end of the hosts file.
If you have Skype installed on your system, it likely you will get port 80 problem. To fix this problem, set the application not to use port 80, to do this go to the Tools > Options > Advanced > Connection then uncheck "Use port 80 and 443 as alternatives for incoming connections"
Now we are ready to install PHP VC6 (apache.org binaries.) Do not use PHP VC9 with this Apache Server!
VC9 versions of Apache can be fetched at http://www.apachelounge.com.
Follow the following link to find out of how to update this Apache Server with the Apache Lounge binaries.