[tpop3d-discuss]virtual hosting: /etc/hosts mapping or inverse name resolution??? please help

PhilG philg at 4dwebhosting.com
Thu, 19 Aug 2004 12:49:23 +1200


Yeah, without a problem I can get it to work with a different IP address for
each host name but I have a many domains on the server which are on the same
IP... This must be common for virtual hosters.

Is there no way to do this? It seems like such a common thing to do.... If
there is no current way to do this with the current version, is it a
possibility in the future? I am even willing to get stuck into coding it if
someone can tell me that its actually possible..

Thanks guys!

----- Original Message ----- 
From: "Chris Lightfoot" <chris@ex-parrot.com>
To: "PhilG" <philg@4dwebhosting.com>
Cc: <tpop3d-discuss@lists.beasts.org>
Sent: Thursday, August 19, 2004 11:25 AM
Subject: Re: [tpop3d-discuss]virtual hosting: /etc/hosts mapping or inverse
name resolution??? please help


> On Thu, Aug 19, 2004 at 11:29:11AM +1200, PhilG wrote:
> > Thanks for your response Mike..
> >
> > Okay I tried setting up the /etc/host.conf with the following line:
> >
> > order hosts,bind
> >
> > And have setup domains in the /etc/hosts file in the following format:
> >
> > 127.0.0.1            localhost.localdomain         localhost
> > XX.XX.XX.48    domain.com                      mail.domain.com
> > XX.XX.XX.48    domain1.com                    mail.domain1.com
> > XX.XX.XX.48    domain2.com                    mail.domain2.com
> > XX.XX.XX.48    domain3.com                    mail.domain3.com
> > XX.XX.XX.48    domain4.com                    mail.domain4.com
> > XX.XX.XX.48    domain5.com                    mail.domain5.com
> >
> > The XX.XX.XX.48 is all the same IP, I have tried reversing it also so
the
> > mail. is in front... However when I connect and watch the logs it always
> > defaults to the first domain on the list (eg domain.com).
>
> No, this won't work.
>
> The idea of the `mass virtual hosting' option is that if
> you have (say) a machine which answers requests for 1,000
> different IP addresses, each with a different assigned
> hostname, you don't need to tell tpop3d to listen on each
> address explicitly; instead, it looks up the name
> associated with the IP address to which the connection is
> made, and infers the domain from that (using the regex you
> supply).
>
> But in your case, all the connections are coming in on the
> same address, XX.XX.XX.48, so tpop3d has no way to figure
> out which domain a user wants. I'm afraid you'll have to
> ask users to log in with their username and domain....
>
> -- 
> ``Murder is always a mistake.... One should never do anything which
>   one cannot talk about after dinner.'' (Wilde)
>
>