Now what we have to do is to simply add few more entries per client in this file. You may want to use your clients domain name as mapping key (e.g. viralpatel.local)Code language: HTML, XML (xml)127.0.0.1 localhost
Add as many entries as you want in hosts file. Whenever you enter “client1.local” in your web browser, windows will first look into hosts file and if it gets the corresponding entry, it sends the request to that IP Address. Now we have to change httpd.conf. Open the httpd.conf file and search for something like:Code language: HTML, XML (xml)127.0.0.1 client1.local
Add following code after the ‘DocumentRoot “c:/wamp/www”‘ entry in httpd.conf file.Code language: HTML, XML (xml)'DocumentRoot 'c:/wamp/www''
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot 'C:\wamp\www'
</VirtualHost>
<VirtualHost 127.0.0.1>
ServerName myclient.local
DocumentRoot 'C:\wamp\www\ClientsMyClient'
</VirtualHost>
Code language: HTML, XML (xml)
And now you need to modify the code a bit to match the server name with the one from your ‘hosts’ file and the DocumentRoot with your clients file path. Java URL Encoder/Decoder Example - In this tutorial we will see how to URL encode/decode…
Show Multiple Examples in OpenAPI - OpenAPI (aka Swagger) Specifications has become a defecto standard…
Local WordPress using Docker - Running a local WordPress development environment is crucial for testing…
1. JWT Token Overview JSON Web Token (JWT) is an open standard defines a compact…
GraphQL Subscription provides a great way of building real-time API. In this tutorial we will…
1. Overview Spring Boot Webflux DynamoDB Integration tests - In this tutorial we will see…
View Comments
Quite helpful
thankx, it was helpful
does not work
Thank you for sharing this great tutorial
Your blog posts are really helpful.This is for windows operating system. I have written this for Linux.
http://www.nimesha.comyr.com/wordpress/?p=274
http://www.nimesha.comyr.com/wordpress
Isn't that cute? But it's wrong!
Doesn't work by me. I used *:80 instead of 127.0.0.1 and everything started to work as it should. Cheers!
*:80 is what I usually use instead of 127.0.0.1
I've posted an article on setting up multiple virtual hosts in WAMP with little effort
http://speedydan.co.uk/tutorials/set-multiple-virtual-hosts-wamp/
Nice..Thanks
The tutorial is bad practice. This is the right way to do it.
In httpd.conf uncomment
LoadModule vhost_alias_module modules/mod_vhost_alias.so
That loads up the virtual hosts file
Then in extra/httpd-vhosts.conf
add your virtual containers
thanks