From owner-freebsd-questions Fri Apr 18 15:07:54 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id PAA07344 for questions-outgoing; Fri, 18 Apr 1997 15:07:54 -0700 (PDT) Received: from gdi.uoregon.edu (gdi.uoregon.edu [128.223.170.30]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id PAA07339 for ; Fri, 18 Apr 1997 15:07:51 -0700 (PDT) Received: from localhost (dwhite@localhost) by gdi.uoregon.edu (8.8.5/8.6.12) with SMTP id PAA14722; Fri, 18 Apr 1997 15:07:48 -0700 (PDT) Date: Fri, 18 Apr 1997 15:07:48 -0700 (PDT) From: Doug White X-Sender: dwhite@localhost Reply-To: Doug White To: Adam Majowicz at Connecticut Online cc: questions@FreeBSD.org Subject: Re: help on multiple web hosting In-Reply-To: <3357C9EE.7025@compsol.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk On Fri, 18 Apr 1997, Adam Majowicz at Connecticut Online wrote: > I am using free bsd and the apache server that goes with that Okay. What version of FreeBSD is it? > I have learned many things on this unix environment that is new to me The learning curve is steep but the rewards are plentiful. > I just need to know how to make an ip address go to the proper > dirrectory to find a file No problem. > www.domain1.com is located in /home/domain1/public_html directory > www.domain2.com is located in /home/domain2/public_html directory Easy. Modify /usr/local/www/server/conf/httpd.conf. At the bottom of that file you'll find the following: # VirtualHost: Allows the daemon to respond to requests for more than one # server address, if your server machine is configured to accept IP packets # for multiple addresses. This can be accomplished with the ifconfig # alias flag, or through kernel patches like VIF. # Any httpd.conf or srm.conf directive may go into a VirtualHost command. # See alto the BindAddress entry. # #ServerAdmin webmaster@host.some_domain.com #DocumentRoot /www/docs/host.some_domain.com #ServerName host.some_domain.com #ErrorLog logs/host.some_domain.com-error_log #TransferLog logs/host.some_domain.com-access_log # You will need to create a VirtualHost tag that looks something like this... DocumentRoot /home/domain2/public_html ServerName www.domain2.com > for both ip's but when I try accessing the page it does not go to either > dirrectory it goes to the one that was setup > > (I try access http://200.200.200.20/) This procedure will work only for domains with names. If you don't have a name for your alias yet, then this probably won't work. > I know that I have to tell them which ip is for which domain but don't > where and how. And which domain goes to which directory The above should help you. If you need more information, consult the Apache documentation at http://www.apache.org. Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major