Skip to content

Instantly share code, notes, and snippets.

@sibysathyanesan
Created June 30, 2019 17:03
Show Gist options
  • Save sibysathyanesan/31d4f8593da05262c24f872f2ce7e93b to your computer and use it in GitHub Desktop.
Save sibysathyanesan/31d4f8593da05262c24f872f2ce7e93b to your computer and use it in GitHub Desktop.
1.) Update the vhosts file in Apache configuration. Under your XAMPP folder
apache\conf\extra\httpd-vhosts.conf and if needed change the ports (i.e. if you use 8080 instead of port 80)
ex: <VirtualHost *:80>
DocumentRoot “[my site file’s path]”
ServerName [your favourable server name]
<Directory “[my site file’s path]”>
Require all granted
</Directory>
</VirtualHost>
2.) Update the hosts file. On Windows XP, you can find it under
c:\WINDOWS\system32\drivers\etc\. You should already see the first line from below,
it takes care of your mentioned other project. - add the additional ones to make any requests to the mentioned virtual hosts routed back to your own machine.
127.0.0.1 localhost
127.0.0.1 foo-bar.com
127.0.0.1 abcdef.com
127.0.0.1 qwerty.com
3.) Do a quick configuration check. Open {XAMPP-folder}\apache\conf\httpd.conf
your file and make sure that the following part is not commented out by a preceding # character:
Include conf/extra/httpd-vhosts.conf
4.) Restart XAMPP.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment