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:

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

(The above video tutorial: My Operating System is Windows 10 Professional 64bit, I use "")

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 use Apache 2.4+ VC11, the minimum system requirement is Windows 7 SP1 and Visual Studio C++ 2012 must be installed on our system. Follow the below link to download it.

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

Updade: May 2016

If you use Apache 2.4+ VC14, the minimum system requirement is same as above, Visual Studio C++ 2015 must be installed on our system. Follow the below link to download it.

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

=== end of update.

If you use Apache 2.2 and 2.4 VC9 you can follow the link from 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 up 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.

Apache Monitor

Apache Monitor is a GUI tool as an icon in the notification area (system tray) that can be used to star, stop, and restart the Apache server. To run this tool go to the apache's bin folder "C:\Apache\bin" and double-click "ApacheMonitor.exe"

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 then 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, VC14 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 :)

  11. thanku.. :)
    but i got some errors while installing apache and starting it...
    "no listening sockets available..AND unable to open logs"
    what i hav to do?how it can be resolved..pls help me.. :(

    1. It seems the port 80 is already used by another program, it can be firewall, antivirus or any other programs.

      You can run "netstat -ano" from command prompt, click Start/Run and then type netstat -ano, you will see something like TCP and in the last column there is a PID column, check that PID number in Task Manager to find out what program using that port.

  12. hey its only works in IE but not in firefox and chrome browser

    1. I can access it in any browsers here, sorry I can't help you. Maybe it's something to do with your browser's settings, try to clear browser's cache, disable add-ons, proxy and see if it will solve your problem

  13. when i enter httpd -k start command ...
    "AH00558: httpd: Could not reliably determine the servers fully qualified domain name, using fe80::459e:e648:ab6e:5e4a"
    "AH00451: no listening sockets available, shutting down"
    "AH00015: unable to open logs"

    how can i fix this. thanks :)

    1. Make sure the ServerName is included in the httpd.conf file.

      ServerName localhost:80

      If you still get "no listening sockets available" see my previous comment on how to find out what program using port 80, uninstall that program and install it back after Apache Server has been started.

  14. when i installed php, and it says;
    C:/Apache/conf/httpd.conf: Cannot load C:/Apache/php/php7apache2_4.dll into server: The specified module could not be found.

    1. Sorry for the late response,

      The first thing you need to chek is make sure the file "php7apache2_4.dll" is exited in the php installation folder the next thing is the correct path to the file "php7apache2_4.dll" in the Apache configuration file (httpd.conf)

      LoadModule php7_module C:/Apache/php/php7apache2_4.dll

      For your reference here are the binaries I use at the moment that works flawlessly "httpd-2.4.18-win32-VC14" and "php-7.0.1-Win32-VC14 thread safe"

      Minimum system requirements for VC14 binaries are Windows Vista SP2, Windows 7 SP1, VC14 binaries do not run on XP.

  15. Thank you for such a helpful post ...!!!!

  16. Great, Thank you very much. The best manually to install aplication web!

  17. Appreciate great work !!!!!!