Multiple LocalHost Sites

I’ve got XAMPP installed on a Windows 7 machine. I wanted a way to test multiple sites locally.

Set up the local host file

In your host file, add (replace with the domains you want):

UPDATE: Thanks to the host file edits are optional if you use the style (replace with your actual IP address). This is compatible with Adobe’s Edge Inspect.

Set up XAMPP config files

In \xampp\apache\conf\httpd.conf uncomment the following at about line 140:

LoadModule vhost_alias_module modules/

I’ve used the folder structure of “\xampp\htdocs\\web\content\files.php” (for example) and the following config will find the folder with the exact name in the url.

In \xampp\apache\conf\extra\httpd-vhosts.conf:

[hoops name="config"]


If you are having issues with DOCUMENT_ROOT, create setdocroot.php at “\xampp\” and put the following in it:

[hoops name="fix"]


Published by

Kenneth Newman

Some of my profiles around the web: Twitter, github,, Google

2 thoughts on “Multiple LocalHost Sites”

Leave a Reply

Your email address will not be published. Required fields are marked *