[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] see a virtual site before nameservers are changed to it
- Subject: Re: [cobalt-users] see a virtual site before nameservers are changed to it
- From: Jeff Lasman <jblists@xxxxxxxxxxxxx>
- Date: Sat Mar 23 15:15:20 2002
- Organization: nobaloney.net
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Phil Beynon wrote:
> As far as I know yes,
> As I understand it what happens is the ip address points it to the server
> then apache decides which site you get based upon the site name.
> I'm not sure what would happen if it was the only virtual site on an ip
> address though.
When you run apache it sorts through all three conf files, like this:
<123.45.6.7>
www.foobar.com => /home/sites/site29/web/
foobar.com => /home/sites/site29/web/
www.fuzle.com => /home/sites/site/28/web
fuzzle.com => /home/sites/site28/web/
</123.45.6.7>
<123.45.6.8>
www.geezer.com => /ome/sites/site12/web/
geezer.com => /home/sites/site12/web/
www.elephant.com => /home/sites/site248/web/
elephant.com => /home/sites/site248/web/
</123.45.6.8>
As you can see, this is greatly simplified.
But apache looks first by IP#, and then underneath it to see if there's
a matching site from the site-headers. If there isn't, or if there
arent' any site-headers, it serves the first site it finds under that
IP#.
So, looking at the above scenario, if you've got an A record pointing
www.ratpack.com to 123.45.6.7, apache would serve the site at
/home/sites/site29/web/.
Of course since the Raq has rewrite rules, it would change the browser
address to show the ServerName for the first site, in this case most
likely "http://www.foobar.com/".
Jeff
--
Jeff Lasman <jblists@xxxxxxxxxxxxx>
Linux and Cobalt/Sun/RaQ Consulting
nobaloney.net
P. O. Box 52672, Riverside, CA 92517
voice: (909) 778-9980 * fax: (702) 548-9484