Home > Apache Tutorials > How to install Apache on Windows

How to install Apache on Windows

September 29th, 2007

So you are interested in working with Apache.

Step 1: Download the package

The first step is to download the package from http://httpd.apache.org/

You should get the latest stable version of the package which is 2.2.6 to the time of this writing. You should download the Microsoft Installer (.msi) package.

Once the package has been downloaded, double click on the icon to run the installation wizard. Click next until you see the Server Information window. Enter localhost for both Network Domain and Server Name. Enter any email that you want for Administrator’s email address.




Click the Next button and choose Typical installation. Click Next one more time and choose where you want to install Apache. It typically gets installed at C:\Program Files\Apache Group location. Click the Next button and then the Install button to complete the installation process.

Step 2: Verify your Installation

After your installation has been successful, you must open your browser and verify that your installation was indeed successful. Open your browser and type http://localhost. You should get a screen like the one mentioned below:



By default Apache is configured to read PHP and HTML files from the htdocs folder available under C:\Program Files\Apache Group\Apache2. The location from where PHP and HTML files are stored is called DocumentRoot.

I would recommend that you create a separate folder for your projects and create a virtual hosting for each project to simulate real environment behavior. I follow this principle for my projects/testing. I have a folder by the name C:\sunilbhatia\websites, under which I create sub-folders for each project that I want to execute/develop. Though not a mandate, but you could follow this procedure.

For the time being lets assume that we will be developing our applications under the htdocs folder. In my next article, I will be taking about how to setup virtual domains on your machine.

Notes on Apache Configuration File

Apache stores all configuration details in a file named httpd.conf file. This file is located under the conf folder of the Apache Root folder. Assuming that you installed Apache in C:\Program Files\Apache Group\Apache2 (which is the Apache Root Folder), then the httpd.conf file will be located under C:\Program Files\Apache Group\Apache2\conf\The configuration file for Apache is stored in C:\Program Files\Apache Group\Apache2\conf folder.

Whenever, you change the httpd.conf file you must restart the Apache Server for the changes to be reflected like this: Start > Programs > Apache HTTP Server 2.2.6 > Control Apache Server > Restart

A note of caution, always remember to take a backup of your httpd.conf file before making any changes to it.

You are done with the installation of the Apache Server. Congratulations!!!

After few years, IT persons will face problem without having certified professional status. No doubt that the new coming time is dedicated for 70-631 TS: Microsoft SharePoint Services 3.0 and MCITP 70-443 and 156-315 Check Point Security Administration NGX certified professionals. You should also try to pass the latest Cisco 642-383 CXFF and Cisco DCNS 646-976 Data Center Network Solutions Sales exam.

Categories: Apache Tutorials Tags:
  1. October 7th, 2007 at 08:51 | #1

    Thank you for sharing!

  2. November 26th, 2009 at 13:31 | #2

    Excellent information. It helps me very much. Keep it up.

Comments are closed.