Setup virtualhost in windows using wamp

Setup virtualhost in windows using wamp

8 easy steps to setup virtual host

  1. Download wamp and install it
  2. Open your host file using C:/Windows/System32/drivers/etc” and open the “hosts” file.
  3. Put this line at the end of file  without quotes “   myproject.local    #My Test Site”.
  4. Now open  “C:/wamp/bin/apache/Apache2.2.21/conf/” and put these following lines at the bottom

NameVirtualHost *:80

<Directory C:/Users/drshaikhfarooque/Documents/Projects>
Order Deny,Allow
Allow from all


5.Now locate these line in the same file

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

and instead of above , replace it with

# Virtual hosts
Include conf/extra/httpd-vhosts.conf(uncomment it).

6.Now add these lines also at the end of file

<VirtualHost *:80>
DocumentRoot “C:\Users\drshaikhfarooqur\Documents\Projects\myproject”
ServerName mysite.local

7.Now restart your wamp server by clicking on “restart all services”

8. Now open your browser and go to address bar and type there “myproject.local”

Have a fun ; your virtual host is working now !