Sunday 25 October 2015

How To Setup Virtual Hosts Using XAMPP

steps

1. C:/xampp/apache/conf/extra

edit : httpd-vhosts.conf

add: 
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/testsite"
ServerName dev.test.com
ServerAlias dev.test.com
<Directory "c:/xampp/htdocs/testsite">
AllowOverride All
Require all Granted
</Directory>
</VirtualHost>
 
2.locate C:/Windows/System32/drivers/etc/
 
edit host file.
 
add the ff.
 
127.0.0.1             localhost
127.0.0.1             dev.test.com
 
restart xampp and now you have your vhost!!!