Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

apache/dns question?



On Tue, May 24, 2011 at 8:18 AM, Edward Ned Harvey <blu-Z8efaSeK1ezqlBn2x/YWAg at public.gmane.org> wrote:
>> 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?
>
> 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.

The DNS configuration can be taken care of with a wildcard DNS record.
 Essentially, you direct *.example.com to your IP.  Then any
username.example.com would resolve to your server, which would return
username's site.  Any nonexistent user would return a 404 (instead of
"can't find the server.")

A potential disadvantage to the name-based virtual hosts is that they
don't work with HTTP 1.0, only HTTP 1.1.  (The problem is that HTTP
1.0 doesn't require the Host: header, so the server doesn't know what
hostname the client wants to talk to, only the IP, which is the same
for all the users.)  I've used name-based virtual hosting for many
years without having this come up.  There are some annoying
workarounds if you want stuff to work with HTTP 1.0 clients, but
they're not worth it IMHO. See
http://httpd.apache.org/docs/2.2/vhosts/name-based.html#compat

>
>> 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.
>
> _______________________________________________
> Discuss mailing list
> Discuss-mNDKBlG2WHs at public.gmane.org
> http://lists.blu.org/mailman/listinfo/discuss
>






BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org