3

I'm trying to create a new virtual host where any subdomain will point to the document root.

It needs to be a wild card as new subdomains will be added progmatically.

What I have so far in my vhost config (relevant part):

<VirtualHost *:80>
     DocumentRoot "C:/xampp/htdocs/test"
     ServerName test.dev
     ServerAlias *.test.dev
</VirtualHost>

Windows hosts:

127.0.0.1   *.test.dev

I'm only able to access test.dev but not a subdomain of it.

Asa Carter
  • 2,207
  • 5
  • 32
  • 62

1 Answers1

2

Windows host files are not compatible with wildcard domains.

Using the acrylic application as a proxy as described here fixed the issue.

Wildcards in a Windows hosts file

Community
  • 1
  • 1
Asa Carter
  • 2,207
  • 5
  • 32
  • 62