On Apr 24, 2008, at 3:00 PM, Wade Preston Shearer wrote:

I am trying to set up wildcard DNS and web roots for developer sandboxes, like this:

*2.*1.dev.example.com ➞ /home/*1/sites/*2/htdocs/
*2.*1.dev.example.com ➞ /home/*1/sites/*2/htdocs/
*2.*1.dev.example.com ➞ /home/*1/sites/*2/htdocs/


Where *2 is a project and *1 is a username, like this:

www.jdoe.dev.example.com ➞ /home/jdoe/sites/www/htdocs/
blogs.jdoe.dev.example.com ➞ /home/jdoe/sites/blogs/htdocs/
test2.jdoe.dev.example.com ➞ /home/jdoe/sites/test2/htdocs/


I have worked two different places previously where we had something such as this set up. I did not do it myself though so I do not know exactly what was involved. I am fairly certain that it was just done with some regular expressions. I am getting resistance, from the team that manages the servers that I am trying to get it implemented on now, that it won't be possible because of missing modules and "a lot of caveats" that come from said modules even if they were installed. Does such a set up really require additional modules? Is it really that complicated? Can't this just be done with regular expressions in your DNS and in your httpd.conf?

This is on linux servers running Apache.

You shouldn't need to change the DNS to do this. If example.com is pointing to your server (perhaps it needs to be *.example.com) then Apache will listen for every request to any subdomain of example.com. Each VirtualHost can respond to a different subdomain.




_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to