Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Setting up your system as virtual host using WAMP

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 273
    Comment on it

    if anyone configure's virtual hosts on WAMP server helps to run as many separate sites as you want.This includes following quick steps

    1.Go to "C:/Windows/System32/drivers/etc" and open the "hosts" file in Notepad. At the bottom of the hosts file, below all the other text, add a new line with the following:

    127.0.0.1 xyz.domain.com #My Test Site
    

    "xyz.domain.com" is the domain name that will be used for your local site. You can name this whatever you want, like "newsite.local" etc.Save file.

    2.Open "C:/wamp/bin/apache/Apache2.2.21/conf/" Open file named "httpd.conf".At line 467, uncomment the line

    "Include conf/extra/httpd-vhosts.conf"
    

    After making changes please save file.

    3.Go to "C:/wamp/bin/apache/Apache2.2.21/conf/extra" and open the file "httpd.vhosts.conf".We need to give Apache permission to look in our "Projects" folder for websites. At the bottom of the page, below all the other text, add the following:

    <Directory C:/wamp/www>
    Order Deny,Allow   
    Allow from all 
    </Directory>
    
    <VirtualHost *:80>   
    DocumentRoot "C:\wamp\www\myproject" 
    ServerName  xyz.domain.com
    </VirtualHost>
    

    The DocumentRoot should be the path to the folder where your project is, and the ServerName should match the domain you entered in your hosts file in Step 1.Save the file.

    4.Restart WAMP server.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: