Many name - same IP

Aaron Peterson dopplecoder at gmail.com
Mon Sep 19 09:18:27 PDT 2005


On 9/19/05, Carstea Catalin <carstea.catalin at gmail.com> wrote:
> How make www.blogger.com ( for example ) to have many sub-domains with same IP.
> Ex:
> blog1.blogspot.com - 66.102.155.101
> blog2.blogspot.com - 66.102.155.101
> blog3.blogspot.com - 66.102.155.101
> --
> this 66.102.155.101 is IP of host blogspot.blogspot.com
> ...............................
> it is about apache with tag virtual host ?

First, the authoritative DNS servers for your domain must be
configured to resolve all of the sub-domains to the specified IP
address.  Otherwise your server will never recieve any communication
to begin with.  Then to set up virtual hosting with apache, if you
want one vhost to service all the sub-domains, I believe you can use
the ServerAlias directive in your VirtualHost definition like so:

ServerName blogspot.com
ServerAlias *.blogspot.com

Or set up separate vhost definitions for each sub-domain if you want
them to point to different web directories on your server.

Aaron


More information about the freebsd-questions mailing list