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

Re: [cobalt-developers] Virtual sites sharing IP address



As of Sunday night, Per, it looks like no one's answered your real
question yet...

See below...

Per Arne Ensby wrote:

> We have a problem situation with a virtual site on our RAQ3
> server which I best can describe as follows:
> 
> 1 - The virtual site is defined, and the customer has already
> started to work with some web pagres there

So this is the first site using that IP#?

> 2 - Changes in the nameservers has not yet been done, and points
> to wrong addresses

Which means no one can find this site yet.

> So far, it's all logical. But when adding new virtual sites,
> strange things happens:
> 
> 3 - A new site is defined, defined with A-record on our
> nameservers pointing to the same, shared IP address as the one
> mention above. This site works nice.

Let's make sure I understand... This is the second site on the IP#? 
It's completely separate from the site in point 1, right?

> 4 - two other domains shall be routed to the site described
> above (3). On the name servers, these domains has CNAME
> records  that points to the domain (3). When accessed from
> the browser, connection to domain from (1) is attempted,

This is exactly what should happen... if Apache can't find a ServerName
or ServerAlias record matching the name of the domain it's looking for,
it'll serve up the first site on the domain...

> and fails (since the site is not correctly defined in
> any nameservers).

It fails because Rewrite is turned on, and Apache therefore rewrites the
URL to the one set up for the first site.  Then Apache can't find that
in DNS.  So it fails.

> So, whats going wrong here? Must Virtual Sites be defined in
> a nameserver before a site can be created when sharing IPaddress?

Nothing to do with that.

You need to put in a ServerAlias line into the
/etc/httpd/conf/httpd.conf file in the virtual block for the site to
which you're directing the new site.

Jeff
-- 
Jeff Lasman <jblists@xxxxxxxxxxxxx>
nobaloney.net
P. O. Box 52672
Riverside, CA  92517
voice: (909) 787-8589  *  fax: (909) 782-0205