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: localhost dummy.localhost

Here is the reference I found:

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: dummy1.localhost dummy2.localhost dummy3.localhost

Leave a Reply

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