VirtualHost Forbidden on Windows 7 using XAMPP

Thought I would share a quick fix that was needed to have local subdomain when running XAMPP on Windows 7.

Go to C:\WINDOWS\system32\drivers\etc then locate ‘hosts’ file. NOTE: Create a backup of the file before editing.

Update it to include your virtual host:

127.0.0.1 localhost
127.0.0.1 dummy.localhost

Here is the reference I found:  http://www.codingcereal.com/2011/05/setting-up-multiple-subdomains-in-your-localhost-using-xampp/

One thought on “VirtualHost Forbidden on Windows 7 using XAMPP

  1. This also works in linux/OSX by editing the /etc/hosts file.

    I just had to do the same thing and ended up with putting multiple subdomains on one line like this:

    127.0.0.1 dummy1.localhost dummy2.localhost dummy3.localhost

Comments are closed.