how to setup virtualhost in windows using wamp

0

how to 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 “127.0.0.1   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
</Directory>
 
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
</VirtualHost>
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 !
 
 
 

Leave A Reply

Your email address will not be published.