[TriLUG] Apache Virtual Hosts Question

James Manning jmm at sublogic.com
Mon Nov 3 10:29:40 EST 2003


> I have a question about Apache's Virtual hosts. Let's say that I have a 
> few directories, "host1", "host2", "host3", all in one parent 
> directory, "sites". is there any way that I can configure apache to 
> automatically serve requests for host1.mydomain.com from the "host1" 
> folder, and requetss from "host2.mydomain.com" from the "host2" folder? 
> I know I can configure virtual hosts for each, but I'm trying to avoid 
> that -- I want to be able to just add a new directory and have a new 
> host. How do these free web hosting services do it? (You know, the ones 
> where you sign up as "username" and instantly your website is at 
> http://username.freehost.com/")?

Dunno how they actually do it, but a wildcard DNS entry and
mod_rewrite should be able to handle this I would imagine.
-- 
James Manning <http://www.sublogic.com/james/>
GPG Key fingerprint = B913 2FBD 14A9 CE18 B2B7  9C8E A0BF B026 EEBB F6E4



More information about the TriLUG mailing list