*BSD News Article 93193


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!news-xfer.netaxs.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!rill.news.pipex.net!pipex!tank.news.pipex.net!pipex!news.utell.co.uk!usenet
From: brian@shift.utell.net (Brian Somers)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Need first hand help w/Apache 1.1 and Mulitiple IPs !!
Date: 9 Apr 1997 11:15:49 GMT
Organization: Awfulhak Ltd.
Lines: 45
Message-ID: <5iftp5$a5t@ui-gate.utell.co.uk>
References: <01bc444b$98b0f0a0$664c1bcc@tony.gcr1.com>
Reply-To: brian@awfulhak.org, brian@utell.co.uk
NNTP-Posting-Host: shift.utell.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Newsreader: knews 0.9.8
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:38790

In article <01bc444b$98b0f0a0$664c1bcc@tony.gcr1.com>,
	"Tony" <tony@gcr1.com> writes:
> I need someone who can tell me first hand how to create virtual IPs and
> use them with Apache 1.1 to do multiple web sites on one 2.1.7 FreeBSD box
> ?
> Anyone know how to do this ??
> 
> Have any docs I can look at ??
> Have any config. files I could look at ??

Have a look at the comments in httpd.conf.  You need something like:

BindAddress host1:80
BindAddress host2:80
Listen host1:80
Listen host2:80

<VirtualHost host1>
ServerAdmin webmaster@host1
DocumentRoot /usr/local/www/host1/data
ServerName host1
ErrorLog /var/log/host1-err.log
TransferLog /var/log/host1-acc.log
ScriptAlias /cgi-bin/ /usr/local/www/host1/cgi-bin
</VirtualHost>

ServerAdmin webmaster@host2
DocumentRoot /usr/local/www/host2/data
ServerName host2
ErrorLog /var/log/host2-err.log
TransferLog /var/log/host2-acc.log
ScriptAlias /cgi-bin/ /usr/local/www/host2/cgi-bin

Note, one of the hosts should not be inside its own VirtualHost bit.
Once you've done your interface aliases (see /etc/sysconfig), bob's
your uncle !

> Thanks,
> 
> Tony

-- 
Brian <brian@awfulhak.org> <brian@freebsd.org>
      <http://www.awfulhak.demon.co.uk>
Don't _EVER_ lose your sense of humour !