Wildcard VirtualHosts
I was wondering if/does VirtualHostX will support wildcard domains?
ie. hello.site poiints to /site/public_html/ but world.hello.site points to /site/subdomains/world/
Can do it at the moment (sorta) by creating a new virtualhost for each subdomian, but it's messy.
ie. hello.site poiints to /site/public_html/ but world.hello.site points to /site/subdomains/world/
Can do it at the moment (sorta) by creating a new virtualhost for each subdomian, but it's messy.
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The company marked this question as answered.
-
Inappropriate?Wildcard domains are something I've toyed with in the past, but I've never been able to make work in OS X properly.
In theory, you could create a virtual host like this:
<virtualhost>
VirtualDocumentRoot /Users/<username>/Sites/%0.0/
and then setup a wildcard DNS in your /etc/hosts file like this
127.0.0.1 *.site
and then every mysite.site and mysite2.site, etc would map to the appropriate folders.
I've done that on Linux machines in the past, but OS X seems to ignore the wildcard DNS entry, which is key. Based on this hint
http://www.macosxhints.com/article.ph...
I think you could accomplish it by setting up a local name server on OS X, but I've never tried.
I guess that's a long way of saying that VirtualHostX could help you set it up if the OS allowed it. I'm open to suggestions if anyone else has a better idea of how to make it work :-)</username>
1 person says
this answers the question
-
Inappropriate?Thanks for the quick response Tyler!
I half expected you to tell me something like this. Nevermind - was just asking in case. Maybe Mac OS X will start behaving itself in the future - here's hoping anyway.
I’m satisfied
Loading Profile...



EMPLOYEE