February 9, 2016 asvignesh 0Comment
Setup a Virtual Host on WAMP
Most developers do work locally, Like them i work locally, test then deploy to staging / production.
Sometime i used to work on WAMP stack too… in this case creating virtual hosts is better option
V-Hosts makes URL cleaner, no need of much modifications in case of CMS

let’s setup a virtual host in WAMP.

Open your Apache configuration
Default Location : C:\wamp\bin\apache\apache2.4.9\conf
Search for “Virtual hosts”
Uncomment the Include line if it is commented

Virtual Host Config File Include
Virtual Host Config File Include

Now update the Virtual host config file
Sample vHost config
<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot “C:\wamp\www\asvignesh.local”
    ServerName asvignesh.local
    ErrorLog “logs/asvignesh.local.log”
    CustomLog “logs/asvignesh.local.log” common
</VirtualHost>

V Host Config
V Host Config

Set your windows host file
Location : C:\Windows\System32\drivers\etc\hosts

Windows Host File
Windows Host File

Restart WAMP Services
You are done…
Open the vHost server from your browser ..
page

Leave a Reply

Your email address will not be published. Required fields are marked *