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

Re: [cobalt-users] Combining name.based and IP based hosting - long



Looks like you want an awful lot of consulting...<smile>...

Diana Brake wrote:

> WHoa....:) I've been trying to figure out the best way to set up my machine
> so that it will do both..IP hosting and name based. I'll try to explain my
> confusion..:) I used to resell at AIT where I had full control of the
> httpd.conf file. I "understood" what to touch and what to leave alone there
> because they often didn't do the set ups for my new domains correctly and I
> had to go fix them. But, when I got the raq2, the techy at the coloc I use
> now said that AIT's version was VERY hacked and that Cobalt's use of
> httpd.conf was more standard.

Can you tell me what he drinks?  Sounds interesting <smile>.

> So, now I'm afraid to touch it, not knowing
> exactly what to do. (Coloc techy person doesn't know what to do either -

If you're talking about a RaQ, honestly you're not supposed to touch
it.  If you really expect me to incur the liability involved in telling
you how to touch it, you're mistaken.  I can be bought, but I'm not
cheap <smile>.

> they're against named based hosting because they want to sell more IP
> numbers..:)and so far, I'm the only Raq owner they coloc.)

Then they're in the minority.  Most hosting companies want you to use
less numbers, and make it both expensive and hard for you to do
otherwise.  Tell me who they are; I'll move there; I need lots of
numbers <smile>.

> I'm trying to learn what the cname function actually is used for, what it
> does to the file(s) and if it is what is used to set up name based
> vhosts...

DNS has absolutely NOTHING to do with what happens once a packet gets to
your computer.  DNS is all about getting a packet to your computer. 
Nothing more.  Or at least that's the way it should be.  But of course
to do virtual hosting, the httpd daemon (Apache) needs to know which
pages to display.  They can do that either by looking at numbers (the
default) or by looking at the name.  The latter is called name-based
hosting.

CNAME records are used to point to other records.  The only valid use
for them is to point to a record for a domain you don't control, so you
can't tell when they're going to make a change.  If you're hosting the
targets CNAME records, you'll be saving both time and Internet traffic
to use A records.

> and then do I have to edit the httpd.conf file to set a specific
> directory for the new domain name to call home? Do I have this close yet
> then? If I can set up a name based vhost by just assigning it an IP that is
> already in use by another domain, then what do I do in the parameter setup
> area for DNS to make it point to a separate web site over the first one on
> that IP?

DNS has NOTHING to do with that.  Not even with the RaQ setup.

> or is that why the httpd.conf file must be edited by hand?

While I've had to edit /etc/httpd/conf/httpd.conf by hand, I've never
had to do it to point to a separate website.  It really sounds like you
don't know what you're doing.  If I'm not mistken and you really don't
know what you're doing, DON'T experiment.  If you experiment and you're
wrong you'll end up restarting your httpd daemon, it won't restart
because you made an error, and all your sites will disappear.  And then
you'll call Cobalt Tech support, who'll call you back four days later to
charge you $200 an hour <wry grin>.

> ex) I have set up...girlposse.com - 209.212.150.39

While I'm not going to teach you how to set up a website right now, I
will answer some of your questions...

> This has been up and
> running for quite some time now as a functioning web site. I have A records
> and PTR records for both girlposse.com and www.girlposse.com.

Do both girlposse.com and www.girlposse.com point to the same IP#?  If
so, then why do you have pointer records to both of them?  If you really
and honestly don't know, then please stop messing with DNS until you've,
yes..... RTMF (read the fine manual) and made sure you understand it. 
"DNS and Bind", Published by O'Reilly, available from me at full price
<smile> or from Amazon at a 20% discount.  Otherwise one day none of
your sites will work and you won't know why.

> This same
> client would like to have a new domain (grrlposse.com) so I figured this
> was the perfect situation for a name based vhost situation.

Ma nishtana ha laila hazeh, micol halelos?  (Or to paraphrase in
english, why is this situation different from any other?)

> (There is no
> work being done at grrlposse.com

Will grrlposse.com always point to girlposse.com?  Or will it eventually
point somewhere else?

> as of yet so I didn't set up a new virtual
> host in the admin control panel,

Do you need mail for the site?  If so, how did you set that up?

> but I created the A record that points a
> name to a specific IP...

The same IP# as girlposse.com?  Or something completely different?  In
either case, why?

> and didn't do one (PTR) for the IP back to the
> name.)

Good!!!

> at this moment, the URL grrlposse.com resolves to girlposse.com.

Okay, so they both go to the same site.

> When we want to migrate the grrlposse.com name so that it will host
> separate pages than the girlposse site, do I take out the DNS A record that
> is there now and replace it with a cname record?

If so, you'd better be prepared to understand why you'd do that.  Do you
have any idea what a CNAME record does?  No, eh?  Okay, here's what it
does.  Instead of returning the IP#, it returns the name of another
domain, so the client doing the asking has to ask again.  In other words
the most common effect of using a CNAME record is to double the Internet
traffic caused by DNS servers.  This is a good tradeoff if there's a
reason for it; but you haven't given me one yet.

> Do I create the site in the admin control panel and assign it the same IP
> as the original girlposse.com?

If not, you'd better know how to do it inside the
/etc/httpd/conf/httpd.conf file yourself.  And how to set up everything
else yourself.


> What would the directory structure then become at girlposse.com?  and
> what/where would it be for grrlposse? <? /home/sites/site39/web/grrlposse/
> ?> OR something like /home/sites/site83/web ? for the new
> grrlposse.com  (site39 = girlposse - site 83 = grrlposse)

Do you care what the directory structure is?  Why?  The original would
be whatever site it is now, and the new oen would have an incremented
site number.

Just as you surmise.

But what difference does it make to you?

> Maybe I should NOT create the new site through MY admin control panel and
> just set some DNS record somehow to make the new site show up in a browser
> as a separate site from the first?

The only way I know of to do this in DNS is to make the site look toward
a different domain.  Is there a different domain somewhere that looks
like what you want grrlposse to look like?

> ...then create by hand the directories
> for the new domain?  <? /home/sites/grrlposse/web ?> putting it in the tree
> on the same level as the site# for all other sites? (guessing then that I
> would have to edit group and other unknown files by hand also to add this
> new user?)

And your reason for doing this?  To make life harder?  Or easier?

> at AIT, to view a new site that was a vhost just set up ...before the name
> was propagated...we used a URL like
> this..  http://myaccountatait.com/newaccountjustsetup/

This is the way most of us set up sites.  Cobalt is decidedly
non-standard.

> I can see how this
> wouldn't work though if the Cobalt machine sets the new site in a
> completely different directory from the first one on the IP#. If I set
> things up the way AIT did, it would seem that the new site would NOT have a
> siteadmin control panel...something this client may or may not need.

One has nothing to do with the other; Cobalt could have set it up that
way and still maintained independent control panels; they just didn't.

> But,
> doing it by creating the site through my admin control would give the
> client her own siteadmin panel for grrlposse...just as she has for
> girlposse. And, would any of the changes I'm asking to make affect the
> current girlposse web site in a negative way at all?..since it was said
> above that they would BOTH become name.based?

I don't understand.  Everything you do without using the Cobalt
web-based gui interface can break EVERYTHING ON YOUR SERVER.  Don't do
anything outside of the interface if staying up is important to you
unless you know what you're doing.

I tend to know what I'm doing, at least a lot of the time.  I still
check the book each time I make a change, I still make backups of
everything, and I still check after I've made any change at all, to make
sure everything still works.

If you're not prepared to do this, if you're not knowledgeable to do
this, then realize you may very well break your toaster oven and not
have any breakfast tomorrow.

> so, right now, my httpd.conf file is just as cobalt meant for it to be if
> all is done through the web interface using separate IP#s. It works...hence
> my apprehension about touching it..:) Could someone who is doing combined
> IP and name based hosting show me a portion of their httpd.conf file so
> that I could see its structure?

Sure I could, but you couldn't tell the difference, because there isn't
any.

> Can anyone make sense of my questions here
> and offer advice?...:)

Stay out of your system until you know a lot more.  You know just enough
to be dangerous to yourself and to your clients <wry grin>.

Of course I could be wrong.

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