apache/dns question?

Edward Ned Harvey blu-Z8efaSeK1ezqlBn2x/YWAg at public.gmane.org
Tue May 24 08:18:49 EDT 2011


> From: discuss-bounces-mNDKBlG2WHs at public.gmane.org [mailto:discuss-bounces-mNDKBlG2WHs at public.gmane.org] On Behalf
> Of Myrle Francis
> 
> what I would like to configure instead is to have these webpages
accessable
> via  http://user1.mafmanet.us, http://user2).mafmanet.us)
> 
> Is there some reason why I would/should choose one convention over the
> other?

I would find it annoying to type a ')' and I would find it annoying to need
to remember the )
Are you sure ')' is actually a valid dns character?
If you follow a convention like this, you'll have to be careful not to
collide dns entries with usernames... for example don't create a user named
"www" or else it will collide with the dns namespace you may already be
using "www.foobar.com"

The advantage of the default configuration (using ~, not dns based) is that
you don't have to configure any DNS, and you don't have to configure apache
when you have new or removed users.  Just create a user account and there it
is. 


> And can you please point me to some docs that would explain what I would
> like to achieve and what it is formally called?  (ie http redirection?)

What you're looking for is called Name Based Virtual Host.  It's already
present in the default apache config (just go to the very end of the file)
and start reading the associated documentation on apache.org.  

The way I see it, you have two options:  You could leave the user settings
as they are, and then you could use name based virtual hosting and
redirection to forward the user1.foobar.com to foobar.com/~user1   ...  Or
you could simply eliminate the user settings, and create a name based
virtual host that goes directly to each user's directory.





More information about the Discuss mailing list