you can do this by setting up virtual hosts and your apache httpd.conf file
configure apache
your apache file will be located in:
- C: \ WAMP \ Apache2 \ conf \ httpd.conf
find something like:
DocumentRoot 'c:/wamp/www'
and add the following code after DocumentRoot 'c: / wamp / www' to the file:
NameVirtualHost 127.0.0.1 <VirtualHost 127.0.0.1> ServerName localhost DocumentRoot 'C:\wamp\www' </VirtualHost> <VirtualHost 127.0.0.1> ServerName yourdomain.com DocumentRoot 'C:\wamp\www\ClientsMyClient' </VirtualHost>
configure host file
on mac via terminal:
on windows 7:
- open text editor as administrator
- open the file and go to:% Systemroot% \ System32 \ Drivers \ Etc
(source: edit hosts file in Windows 7 )
when you opened it, just write a new line to the file:
XXX.XXX.XXX yourdomain.com (mostly this will be: 127.0.0.1 yourdomain.com)
I suggest you use yourdomain.local, because if you ever host a website, you may get confused about which one is publicly available and which one is on the local site :).
in your browser you type: yourdomain.com, and you must have a project hosted on a Wamp server with its own domain.
hope this helps !:-)
(source: http://viralpatel.net/blogs/how-to-setup-multiple-virtual-hosts-in-wamp/ )
source share