Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jan 1998 19:17:00 +0100 (MET)
From:      Dirk-Willem van Gulik <dirk.vangulik@jrc.it>
To:        Steve Hovey <shovey@buffnet.net>
Cc:        waqar ahmad <drwaqar@hotmail.com>, questions@FreeBSD.ORG
Subject:   Re: HOW TO CONFIGURE TWO DOMAIN NAMES FOR  A SINGLE COMPUTER.
Message-ID:  <Pine.SOL.3.96.980114190725.8962f-100000@elect6.jrc.it>
In-Reply-To: <Pine.BSI.3.95.980114094557.27392d-100000@buffnet11.buffnet.net>

next in thread | previous in thread | raw e-mail | index | archive | help

Actually, you might want to check the apache pages for this,
http://www.apache.org as there are 'neater' ways of doing this
without wasting a second (valuable) IP address. In short, assume
a DNS setup like

ape.com's primary file:
	ape.com	in soa ns, ...

	www.ape.com	in cname	www.bigserver.com

nut.com's primary file
	nut.com in soa, ns, ..

	www.nut.com	in cname	www.bigserver.com

mies.com's primary file
	mies.com in ns,soa,
	
	www.mies.com	in cname	www.bigserver.com

etc, etc

and now we have bigserver
	bigserver.com in ns, soa,...
	
	www.bigserver.com	in ptr	123.45.56.12

(you could make the others also PTR's and even do bogus reverse mapping
if you are into serious hidding.. but the cname is more illustrative)

Next you put into apache's httpd.conf file

	servertype standalone
	port 80
	...
	ServerName www.bigserver.com
	
	...
	<VirtualHost www.ape.com>
	ServerAdmin webmaster@ape.com
	DocumentRoot /www/docs/ape.com
	ServerName www.ape.com
	ErrorLog logs/ape.com-error_log
	TransferLog logs/ape.com-access_log
	</VirtualHost>

        <VirtualHost www.nut.com>
        ServerAdmin webmaster@nut.com
        DocumentRoot /www/docs/nut.com
        ServerName www.nut.com         
        ErrorLog logs/nut.com-error_log
        TransferLog logs/nut.com-access_log
        </VirtualHost>
 
Now your _normal_ DocumentRoot, ErrorLogs etc are all for the
server www.bigserver.com, i.e.visible as

	http://www.bigserver.com/file
or
	http://456.12.34.5/files

but the files in the directory
	
	/www/docs/ ape, nuts, mies, ..

are visible as

	http://www.ape.com/files..
	http://www.but.com/files

And to make things 'really' neat you could put in the directory
of www.bigserver.com an index.html file with pointers to the
other servers.

But read the apache doc as why and when this works; there are some
catches with very very old browsers which do not support the host
header; but administration is a zillios of times simpler this way.

DW.


On Wed, 14 Jan 1998, Steve Hovey wrote:

> Yes - in apache its called a virtual domain - you set a second IP on the
> server (ifconfig...alias) and an <virtual...> section in your httpd.conf
> 
> On Tue, 13 Jan 1998, waqar ahmad wrote:
> 
> > hi there!
> > One of my clients has got registered his domain name i-e "arain.fam.pk"
> > and now he wants to place his web page on our server. Ful domain name or 
> > our server is "isb.perd.net.pk" 
> > So is there any way so that web page of arain.fam.pk is place on 
> > isb.perd.net.pk and can be accessed by the url www.arain.cam.pk.
> > Thanx
> > 
> > ______________________________________________________
> > Get Your Private, Free Email at http://www.hotmail.com
> > 
> 
> ------------------------------------------------------------------
> Steve Hovey
> Chief Engineer
> BuffNET		More Than Just a Connection!
> ------------------------------------------------------------------
> 
> 

http://cils.ceo.org                         http://enrm.ceo.org
dirkx@technologist.com                     Dirk.vanGulik@jrc.it
+39 332 78 0014       +39 332 78 9549       fax +39 332 78 9185
ISEI/ESBA;                     The Center For Earth Observation
Joint Research Centre of the European Communities, Ispra, Italy




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.3.96.980114190725.8962f-100000>