1- Enable Virtual Host in Apache httpd.conf
Start->Programs->Apache HTTP Server->Configure Apache Server->Edit the Apache httpd.conf Configuration File

or goto httpd.conf folder of Apache Installed Folder

Find this #Include conf/extra/httpd-vhosts.conf (Ctrl + F, type this, Enter)

Then remove # from the line

so it should be

Include conf/extra/httpd-vhosts.conf

2- Folder Security

Still in httpd.conf

Find where similar of this code are:

then put this element after existed one:


[Directory "C:\ My Sites "]
Order Deny,Allow
Allow from all
[/Directory]

Note: c:\My sites is the path of your website

3- Create Virtual Host in httpd-vhosts.conf
open httpd-vhosts.conf then put this element at the bottom

[VirtualHost 127.0.0.1]
DocumentRoot "C:\My Sites\Site1"
ServerName site1.local
[/VirtualHost]

4- Resolving the DNS issue
goto

C:\WINNT\system32\drivers\etc\hosts

or

C:\Windows\system32\drivers\etc\hosts


Put this code in

127.0.0.1 site1.local

Finally restart apache