Download Apache Web Server from:
http://www.apachelounge.com/download/ - Windows 32bit
http://www.apachelounge.com/download/win64/ - Windows 64bit
For your reference, My Operating System is Windows 7 Professional 32bit, I use "httpd-2.4.3-win32-ssl_0.9.8.zip" 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
If you want to use Apache 2.2 and 2.4 VC9 you can follow the link from here. .../upgrade-apache-server-to-vc9-version.html
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 to "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
ServerAdmin admin@example.com"Change it to:
ServerAdmin admin@localhostNext line: Server Name
#ServerName www.example.com:80Uncomment the line and replace www.example.com with localhost:
ServerName localhost:80Next 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:

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

Good job!,
Now you can change your Apache Document Root and Directory to make it easy for you 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:

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 thread safe with this Apache server.
Nice post.. helped me a lot. Thanks..
ReplyDeleteYou make it so simple. Excellent, clear instructions. Thanks
ReplyDeletethANKS A lot....
ReplyDeleteHey, thank you very much, I was so stuck with this insignificant thing... Thanks....
ReplyDeleteWork like a charm
ReplyDeleteVery helpful. Thank you.
ReplyDeletethanks. Why it is necessary to rename folder Apache24 to Apache?
ReplyDeleteIt's not necessary, we rename that just to follow the previous installation.
DeleteI couldn't open httpd.conf file. which program should I use to open it?
DeleteYou can open that file with Notepad.
DeleteThis worked perfectly as the MSI for Apache 2.2.2 failed to start and had loads of errors
ReplyDelete