WAMP - MULTIPLE Websites in localhost - 1-2-3 Steps
Sunday, March 2nd, 2008It has been nicely explained in the following articles:
And in many other places. Worth reading and implementing the same.
Quick ToDO list:
Step:1
Open file, named as ‘hosts’ (found under c:\windows\system32\drivers\etc\ folder in WiinXP)
Add the line mentioned below at the end of that file.
127.0.0.1 client-website-name.local
Save & close that file.
Step: 2
Open httpd.conf (Either search for it, or click White WAMP icon at system tray -> Config File -> httpd.conf)
Search for the string: DocumentRoot
DocumentRoot “C:/wamp/www”
Add FOLLOWING LINES BELOW DocumentRoot “C:/wamp/www”.
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot “C:/wamp/www”
</VirtualHost>
AND below that, add these lines:
<VirtualHost 127.0.0.1>
ServerName myclient.local
DocumentRoot “C:/wamp/www/folder-name”
</VirtualHost>
Now Save & Close httpd.conf
Step: 3
Restart WAMP
Open your web browser and type: http://myclient.local
It will display local copy of your client’s website.
