Setting up Virtual Host for Apache2 server in Windows

Do you want to host your web site from your server?  In my previous post, I posted about how you can install Moodle in Windows 2008 server using Zend server.

Install Moodle 2.0 in Zend Server running on Windows 2008
Installing Zend Server Community Edition (CE) in Windows 2008 Server

Now I decided to route my to the server which I setup.

I already have a DNS name and IP address for the server.  I also purchased DynDNS Pro from

1.  Go to Apache2 folder and open conf.  In conf folder you will see a file called httpd.  This is the file we need to modify.  So go head and open the file in notepad

Configuring Apache web server on Windows 2008

2. Search for “Listen 80” and add the following code

DocumentRoot: Location of your web folder. In my case, I am running Moode
Server Name: Your Domain name which you want to resolve

<VirtualHost *:80>
DocumentRoot "D:\Zend\Apache2\htdocs\moodle"

Configuring Apache web server on Windows 2008 : Virtual Host

3.  If you have your domain name,  you need to go and edit your host records and enter your IP address of the server

Configuring Apache web server on Windows 2008 : Edit Host Records

4. Now you should able to resolve your URL to the server.

Technorati Tags:

Published by Aryan Nava

Founder of "BlockchainMind", CTO for two Blockchain startup during 2018, Cloud/DevOps Consultant and Blockchain Trainer

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: