Install and Configure Apache Webserver to Host a Website from Your Computer

This article tells you how to download, install and configure Apache webserver on your Windows based computer to host a webpage.


  1. Go to and download the latest version of Apache's webserver.
  2. Install Apache.
  3. In the installation process you will get a screen asking you for your domain name, network name, and e-mail address. You can add anything in these fields. Add them in this format:
    • Domain name:
    • Network name:
    • E-mail address:
  4. Once you click Next, you will see a screen asking you what webserver this is. You can choose Apache from the radio button list.
  5. You will get an error message after telling you "Apache could not be configured." "Edit you Apache.conf file"
  6. Next go to Start-Programs-Apache HTTP server <version number>
  7. Choose "Configure Apache Server".
  8. Choose "Edit the apache.conf configuration file".
  9. Go to Document Root "drive:/location"
  10. Change the document root to point to the location of your website folder in the notion noted above using / instead of \.
  11. Do the same for <Directory "drive:/location">
  12. To test your configuration
    • Go to Apache in your taskbar and stop the service.
    • Restart the service.
    • If it won't start, you need to modify your conf file properly.
    • Once it successfully starts, go to your browser and type localhost or in your address bar.

To Restore httpd.conf

  1. If you mess up the httpd.conf file don't worry, go to your main Apache folder. Go to the conf subfolder.
  2. There you will find folder named "Original". All original files backup is present in this folder. Open original folder.
  3. Choose httpd.conf from original folder.
  4. Go to Edit-Select All
  5. Choose Copy
  6. Then go back to your current httpd.conf i.e. out of original folder. and open httpd.conf.
  7. Choose Edit-Select All
  8. Press Delete
  9. Click and paste the original text
  10. Press CTRL + S or press SAVE.

Related Articles