From owner-freebsd-questions Tue Aug 13 00:28:49 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id AAA27257 for questions-outgoing; Tue, 13 Aug 1996 00:28:49 -0700 (PDT) Received: from phil.digitaladvantage.net (phil.digitaladvantage.net [207.40.157.13]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id AAA27252 for ; Tue, 13 Aug 1996 00:28:48 -0700 (PDT) Received: from pamela.digitaladvantage.net (pamela.digitaladvantage.net [207.40.157.16]) by phil.digitaladvantage.net (8.7.5/8.7.3) with SMTP id BAA21035; Tue, 13 Aug 1996 01:12:40 -0500 (CDT) From: zeeb@digitaladvantage.net (Russ Panula) To: questions@FreeBSD.ORG Cc: Eric Chan Subject: Re: WWW on FreeBSD v2.0 Date: Tue, 13 Aug 1996 02:37:47 -0600 Organization: Digital Advantage Corporation Message-ID: <32103aa7.17120930@mail.digitaladvantage.net> References: <199608130214.MAA00420@moredun.nswcc.org.au> <320FF406.1562@ime.net> In-Reply-To: <320FF406.1562@ime.net> X-Mailer: Forte Agent .99e/32.227 Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Eric Chan wrote: >> >> Hi, I am stuck on setting up 2 CERN Httpd v3.0 Web servers on a >> single machine running FreeBSD v2.0. I was told to set up an IP alias on >> the server, so that one of Httpd servers will point to a IP alias. (But I >> don't know how to get it done, Httpd only listens to the port 80 on the >> machine, but not relate to IP address. Could the 2 Httpd Servers listening >> on the same port 80?) >> >> What my company wants is to have 2 separate WWW servers running on a >> single machine with different URL name, such as www.nbcc.org.au (this one >> exists already) and www.nswcc.org.au(need to be implemented). >> >> Have you ever encountered this kind of set up? If you do, could you >> please give me any clues/info on it? >> >> Many thanks >> >> Eric > >I've done this by adding a second entry in the DNS pointing >to the same IP.. >ie: > domain1 IN A a.b.c.d > domain2 IN A a.b.c.d > >a.b.c.d are both the same IP.. > >Don't know if this is right, Works for me. > >-Enjoy >Gary >~~~~~~~~~~~~~~~~ >Improve America's Knowledge... Share yours >The Borg... Where minds meet >(207) 929-3848 > You need to add alias IP addresses to your web server also. You can do this by doing: ifconfig ep0 alias xxx.xxx.xxx.xxx netmask 0xffffffff The netmask is important, it won't work without all the bits set. To automate this so the addresses are assigned at boot time, create a file named /etc/start_if.ep0 containing something similar to this: # Configure further virtual interfaces ifconfig ep0 alias 192.1.1.2 netmask 0xffffffff ifconfig ep0 alias 192.1.1.3 netmask 0xffffffff ifconfig ep0 alias 192.1.1.4 netmask 0xffffffff [etc..etc] And make sure the ifconfig_ep0 line in sysconfig reads something like this: ifconfig_ep0="inet 192.1.1.1 netmask 0xffffff00" Notice the netmask, this is where you specify the actual netmask. Now reboot, and the changes should take place. Of course, if you aren't using an ep0 card replace ep0 with your NIC. Your web server will probably need further configuration once this is completed. I'm not sure how CERN handles virtual hosts, but in Apache you can add something like this to httpd.conf: ## xyz's virtual host ServerName xyz.somewhere.out.there This assumes xyz.somewhere.out.there is can be resolved to one of the virtual interface ip addresses. Any corrections are welcome.. I've been up far too long. Russ