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.
Steps
- Go to www.apache.org and download the latest version of Apache's webserver.
- Install Apache.
- 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: example.com
- Network name: www.example.com
- E-mail address: user@example.com
- Once you click Next, you will see a screen asking you what webserver this is. You can choose Apache from the radio button list.
- You will get an error message after telling you "Apache could not be configured." "Edit you Apache.conf file"
- Next go to Start-Programs-Apache HTTP server <version number>
- Choose "Configure Apache Server".
- Choose "Edit the apache.conf configuration file".
- Go to Document Root "drive:/location"
- Change the document root to point to the location of your website folder in the notion noted above using / instead of \.
- Do the same for <Directory "drive:/location">
- 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 127.0.0.1 in your address bar.
To Restore httpd.conf
- If you mess up the httpd.conf file don't worry, go to your main Apache folder. Go to the conf subfolder.
- There you will find folder named "Original". All original files backup is present in this folder. Open original folder.
- Choose httpd.conf from original folder.
- Go to Edit-Select All
- Choose Copy
- Then go back to your current httpd.conf i.e. out of original folder. and open httpd.conf.
- Choose Edit-Select All
- Press Delete
- Click and paste the original text
- Press CTRL + S or press SAVE.
Related Articles
- Host Your Own Website for Free
- Prevent Bandwidth Theft (or Direct Linking)
- Download from the Internet Forbidden Files While at Work
- Set up a Joomla Website
- Upload Files to an FTP Server With SmartFTP
- Install and Configure Php 5.2.5 and Apache 2.2.8 in Windows Vista