Install Apache on windows 8 – Create your own server – part 1

Want to set up your own web server at home, then you are at the right place. Here I am going  to show you all how to create a completely working local web server at your home using Apache, PHP and MySQL. This is the first part in the series of 3 tutorials. In this part we will install Apache on windows 8 system. The installation guide would be similar for any other operating system. So lets get started.

Step 1: Downloading Apache

Go to Apache download page and download the latest stable version of Apache for your operating system.
Windows users can directly download from here.

Step 2: Install Apache

a) Now browse to the folder where you have downloaded the file. It would be something like “http-2.x.xx-win32-x86.msi“.

b) Double click on that to start the installation process.

c) Click next and accept the licence agreement.

d) Next it will ask you for Network Domain name, server name and Administrator’s email address. Type localhost for both network domain name and server name. And for email address type admin@localhost or any custom email.
apache installation network domain name, server name and administrator's email address

e) Next if you go for typical option it will install apache in default ‘Program Files’ folder. You can go with typical if you don’t want to change the installation path. But I like to install Apache inside a custom folder (like C:ServerApache) to keep it organized. So, I’ll go ahead with custom installation.

f) Click on the change button to change the installation path. Now create a new folder Apache where you want to install apache. (I generally prefer to install apache, php and mysql inside one folder like ‘server’. eg: C:ServerApache, C:ServerPHP, and C:ServerMySQL. It is all up to you where you want to install it.

apache custom installation path

change apache installation path


g) Finally click on the Install button

install apache


e) After the installation is finished you can see a small icon in the windows system tray saying ” Running all apache services”

Step 3: Confirming that Apache is working

To confirm that everything is working fine and all apache services are working, go to your web browser and type http://localhost . You will see a message “It works!”.

it works - apache

The above “It works!” is an index.html file located in the htdocs folder located in your apache installation folder.

Step 4: Configuring Apache (Optional)

If you want to change the location of you web files (i.e. if you want to change htdocs folder to your custom location) then go to your apache installation directory and inside that you will find a ‘conf‘ folder double click on that and then open httpd.conf with notepad.

Now find <Directory "C:/Server/Apache/htdocs"> and replace it with <Directory "C:/Server/WebDocs">. (If your apache installation folder was something else then your directory path may be something else). And also make sure that you have created a folder named “WebDocs” inside C:/Server folder.

Next find DocumentRoot "C:/Server/Apache/htdocs" and replace it with DocumentRoot "C:/Server/WebDocs"

Thus you have successfully installed Apache on your system. The next that you may want to install PHP on your system. Please follow this link to go to the part 2 of this tutorial – Install PHP on Windows 8