How To Install Apache on Windows

Good Day!

We are proceeding well as I am getting your feedback on the previous articles of Fast PHP Tutorial Series and I am happy to hear that they are working and you are learning something…

Till now we have learned “How to Install PHP On Windows” and “How to install PHP on Linux”. Lets start our today’s article which is about installing Apache on Windows so that it can support your PHP scripts on your PC.

First of all download apache,Win32 Binary (MSI Installer), from

You can choose the mirror according to your location to get fast downloading speed.

when you will run the downloaded installation file make sure to put right settings info may be as follow,

Network Domain: localhost

Server Name: localhost

Admin Email:

You may get Anti-Virus or Windows XP SP2 security alert about running apache as service. Allow apache to run as service on your windows.

You must run apache to execute PHP scripts and you can stop it optionally when you are not working with PHP and don’t need apache to waste your system resources.

After apache installation you will be able to see Apache Status Icon in your System Tray; sorry… what did you say? what is system tray? … well, the area where your system displays click (time) or display msn, yahoo and icq etc icons is called system tray.

Apache shows a green kinda icon if it is running and red icon if stopped. you can take mouse on the icon to see the status on mouse-tip. You can also start and stop apache from Start Menu as Apache have made a menu from where you can also run Test Configuration to check your apache installation. If you click on Test Configuration and a dos window appears and then disappears it means installation is working otherwise it will display informative error.

Now to test your Apache Installation on Windows open a browser window and type or http://localhost/ in the address bar. If it shows you Apache home page it means your apache is working.

Now you have to tell Apache where to pick your website pages, for this open the http.conf (apache configuration file) with notepad and search for DocumentRoot and put your website files exact location which may be,

DocumentRoot “C:/PHP_code/htdocs”

now search for and paste your DocumentRoot path here too
Remember whenever you make changes to Apache configuration file you need to restart apache to make the changes take effects. So, what are you waiting for… restart and get ready to dive deep into the PHP-Sea as your system is ready by now to start learning PHP.


  1. Bijan Vakili said,

    January 19, 2007 at 2:20 am

    When changing DocumentRoot to http.conf, there is another line

    that you must change to DocumentRoot as well:

    # This should be changed to whatever you set DocumentRoot to.

    Thanks for the tutorial.

  2. Articles Repository » Blog Archive » PHP programming basics said,

    January 19, 2007 at 10:25 am

    […] How to install PHP on windows How to install PHP on Linux How to install Apache on Windows PHP, MySQL, Apache installers […]

  3. Articles Repository » Blog Archive » Loops in PHP said,

    January 20, 2007 at 11:52 pm

    […] FAST PHP Tutorial (Part 1) How to Install PHP on Windows (Fast PHP Tutorial Part 2) How To Install PHP On LinuxHow To Install Apache on WindowsEasy Installers to Install PHP, MySQL, Apache on Windows in PHPDecision Making using IF-ELSE in phpDecision Making using PHP Switch Statement […]

  4. Apache and PHP under Windows said,

    February 1, 2007 at 7:19 am

    For those that do not wish to install Apache, PHP, MySQL, etc, under Windows by hand, which can be a difficult task… There are already built and configured solutions out there, such as the Web-Developer Server Suite.

  5. Articles Repository » Blog Archive » Detailed Guide On Arrays In PHP said,

    February 1, 2007 at 11:12 pm

    […] FAST PHP Tutorial (Part 1) How to Install PHP on Windows (Fast PHP Tutorial Part 2) How To Install PHP On Linux How To Install Apache on Windows Easy Installers to Install PHP, MySQL, Apache on Windows PHP Programming Basics Operators in PHP Decision Making using IF-ELSE in php Decision Making using PHP Switch Statement Loops In PHP […]

Post a Comment

To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word