Site icon KSoftLabs

How to Create A Virtual Host in XAMPP

XAMPP Tutorial By KSoftLabs.com

Have you ever got tired of having to move all your files to htdocs when you have to test your product? By using a virtual host in XAMPP you can set root folder to a folder other than the default htdocs folder.

Note – I’m using NotePad ++ for this tutorial

<VirtualHost ksoftlabs.localhost:80>
DocumentRoot "G:/KSOFTLABS/Site"
ServerName ksoftlabs.localhost
<Directory "G:/KSOFTLABS/Site">
  Options All
  AllowOverride All
  Require all granted
</Directory>
</VirtualHost>

 

Exit mobile version