Manually Installing Apache Server on Windows 7

If you have any previous version of Apache (MSI Installer from installed on your system, please uninstall it first from Add/Remove program.

Download Apache Web Server from: - Windows 32bit - Windows 64bit

For your reference, My Operating System is Windows 7 Professional 32bit, I use "" for this installation.

To be able to run Apache 2.2 and 2.4 VC10, Visual Studio C++ 2010 SP1 must be installed on our system. Follow the link below to download it, after you've finished downloading the file double click the file to install it.

Ms Visual C++ 2010 SP1 Redistributable Package (x86) - Windows 32bit
Ms Visual C++ 2010 SP1 Redistributable Package (x64) - Windows 64bit

Updade: Novemeber 2013

If you want to use Apache 2.4 VC11 (Minimum system required: Windows 7 SP1), Visual Studio C++ 2012 must be installed on our system. Follow the link below to download it.

Ms Visual C++ 2012 x86, x64 Redistributable Package Windows 32bit and 64bit.

=== end of update.

If you want to use Apache 2.2 and 2.4 VC9 you can follow the link from here. Apache Server VC9 version

Configuring Apache server

Create a new folder in C Drive name it "Apache" extract the httpd zip file you've downloaded to anywhere on your computer and then copy all files and folders over into "C:\Apache" - Navigate to "C:\Apache\conf" folder, double click "httpd.conf" to open it.

Find the Server Root:

ServerRoot "c:/Apache24"

Change it to:

ServerRoot "c:/Apache"

Next line: Server Admin


Change it to:

ServerAdmin admin@localhost

Next line: Server Name


Uncomment the line and replace with localhost:

ServerName localhost:80

Next line: DocumentRoot and Directory

DocumentRoot "c:/Apache24/htdocs"
<Directory "c:/Apache24/htdocs">

Change the lines to:

DocumentRoot "c:/Apache/htdocs"
<Directory "c:/Apache/htdocs">

Next line: cgi-bin Directory

<Directory "c:/Apache24/cgi-bin">

Change it to:

<Directory "c:/Apache/cgi-bin">

Save the configuration file.

Installing Apache

Now, go to the Start Menu > All Programs > Accessories, right-click "Command Prompt" and then click "Run as Administrator"

Navigate to the Apache's bin folder by typing "cd \apache\bin" in the Command shell and then press Enter, type in "httpd -k install" to install the Apache service and then press Enter. If you got any error displayed here, you should fix them first before you try to start the Apache Server. To start the Apache Server simply type in "httpd -k start" and then press Enter.

For more detail see the image below:

Apache Command Prompt

Open your browser and navigate to "http://localhost"

Apache Test Server

Good job!,

Now you can change your Apache Document Root and Directory to make it easier to follow my other tutorials.

Uninstall Apache

In case, if you want to upgrade/downgrade or remove Apache completely from your system follow the steps below.

Open Command Prompt with administrator right (Start Menu > All Programs > Accessories, right-click "Command Prompt" and then click "Run as Administrator") type in "cd \apache\bin" and press Enter, first we will stop the Apache server, type in "httpd -k stop" and then press Enter. Next type in "httpd -k uninstall" to uninstall the Apache Service.

For more detail see the image below:

Apache Command Prompt

That's all, you are safe to delete "C:\Apache" folder or replace it with other versions of Apache.

The next step is installing PHP, use PHP VC9, VC11 thread safe with this Apache server, make sure to use the right binaries, do not mix x86 with x64 binaries.


  1. Nice post.. helped me a lot. Thanks..

  2. Dave ThompsonMarch 29, 2013

    You make it so simple. Excellent, clear instructions. Thanks

  3. thANKS A lot....

  4. Hey, thank you very much, I was so stuck with this insignificant thing... Thanks....

  5. Work like a charm

  6. thanks. Why it is necessary to rename folder Apache24 to Apache?

    1. It's not necessary, we rename that just to follow the previous installation.

    2. AnonymousMay 12, 2013

      I couldn't open httpd.conf file. which program should I use to open it?

    3. You can open that file with Notepad.

  7. AnonymousMay 17, 2013

    This worked perfectly as the MSI for Apache 2.2.2 failed to start and had loads of errors

  8. 2.4, Windows 7, installed in a D: drive folder, and everything worked perfectly, first time. Thank you for these excellent instructions.

  9. Hi
    I have installed vcredist_x64 visual studio and httpd-2.4.12-win32-VC11 apache from your given links. I followed all instruction given by you; however while running httpd -k install command thr cmd I m getting an "The Program can't start because MSVCR110.dll is missing from your computer. Try reinstalling the program to fix this problem".
    please help me to fix it.

    1. The reason is 32-bit process cannot load 64-bit DLLs. You've installed httpd-2.4.12-win32-VC11, try to install vcredist_x32 (x86) visual studio as well.

  10. thank you so much its really very helpful :)