Nov 06 2011

Howto: Virtual Hosts in Apache

You would like to develop several web sites on your Windows workstation.

WAMP Server installation of Apache has Virtual Host definitions in a separate conf file. First you need to uncomment the include in httpd.conf:

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

Then write the definition in the httpd-vhosts.conf file:

NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot "C:/your/website/root"

<Directory "C:/your/website/root">
    Options Indexes FollowSymLinks
	AllowOverride all
	Order Deny,Allow
	Deny from all
    Allow from

Now add your web site name to the hosts file:       localhost

Restart Apache and now you may access the local version of the web site using the URL

Leave a Reply