Virtualhost Wildcard Subdomains
- by Khuram
We have one static IP on which we have routed our company website. We have setup a local machine on windows with WAMP to run our testing server.
We want virtual hosts to test our different apps. However, when creating subdomains, we have a new project which uses wildcard subdomains. How can we create the wildcard subdomains in VirtualHosts.
We use,
NameVirtualHost *
<VirtualHost *>
ServerAdmin admin@test
DocumentRoot "E:/Wamp/www/corporate"
ServerName companysite.com
</VirtualHost>
<VirtualHost *>
ServerAdmin admin@test
DocumentRoot "E:/Wamp/www/project"
ServerName project.companysite.com
</VirtualHost>
<VirtualHost *>
ServerAdmin admin@test
DocumentRoot "E:/Wamp/www/project"
ServerName *.project.companysite.com
</VirtualHost>
However, the last * wildcard does not work. Any help?