This post is about Creating virtual hosts locally, i am gonna write step by step procedure to create your own domain names with xampp server.and yes you can create multiple domains.
Here is the steps for create the virtual Host :
- create a directory with any name.(for example:
- Open the file :
F:/ > xampp > apache > conf > extra > http-vhost.conf
- Uncomment for the name
virtualHost * :80in 19th line , like
##NamevirtualHost*:80here we need to remove “## “
- Add the following Code12345678910<VirtualHost *:80>DocumentRoot "F:/xampp/htdocs/test"ServerName www.test.com</VirtualHost><VirtualHost *:80>DocumentRoot "F:/xampp/htdocs"ServerName localhost</VirtualHost>
- Open the file
c:/ > windows > system32 > drivers > etc > hosts
We have to add a server name in the hosts file for example: 127.0.0.1 www.test.com
www.test.com in your browser and you can see all your files that are in test folder.
Hope it will Help You and please like my facebook page :
and make me proud.By the way if you face any problem then let me know in comment section below