From owner-freebsd-questions Fri Jan 26 17: 0:28 2001 Delivered-To: freebsd-questions@freebsd.org Received: from h0040f6849012.ne.mediaone.net (h0040f6849012.ne.mediaone.net [24.147.179.35]) by hub.freebsd.org (Postfix) with ESMTP id E034D37B401 for ; Fri, 26 Jan 2001 17:00:09 -0800 (PST) Received: (from eric@localhost) by h0040f6849012.ne.mediaone.net (8.11.1/8.11.1) id f0R0x0601664; Fri, 26 Jan 2001 19:59:00 -0500 (EST) (envelope-from eric) Date: Fri, 26 Jan 2001 19:59:00 -0500 From: Eric Johnson To: treznor@sunflower.com Cc: questions@freebsd.org Subject: Re: Apache question again Message-ID: <20010126195900.A1634@h0040f6849012.ne.mediaone.net> Reply-To: eric@coding-zone.com References: <20010127003434.75297.qmail@web10604.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010127003434.75297.qmail@web10604.mail.yahoo.com>; from millioncheese@yahoo.com on Fri, Jan 26, 2001 at 04:34:34PM -0800 X-MUA-OS: FreeBSD 4.2-RELEASE i386 X-Uptime: 7:36PM up 13:18, 2 users, load averages: 0.00, 0.01, 0.00 X-Disclaimer: #include Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Jan 26, 2001 at 04:34:34PM -0800, Tyler McGeorge wrote: > Sorry for not continuing the previous message, but I'm > not at home at the moment. I looked into VirtualHosts > on Apache. Has anybody any experience dealing with > these? I set them up and now either (depending on > which method of guessing I use): neither one works or > they both still point to the secondary host. :( Could > somebody jot up a sample config file for one server (1 > IP) with two domain hosts and different documentroots > for either host. Or perhaps somebody could glance real > quick at the config I have now? I am completely lost. For example, if your IP address is 123.45.67.8 and you have both domains foo.org and bar.org pointing to your IP, this should get you started. http://www.apache.org/httpd.html contains a link to more detailed info. ===== snippet of httpd.conf ## ## set proper permissions for access to directories ## # HTML docs for foo.org go here Options None AllowOverride None Order allow,deny Allow from all # HTML docs for bar.org go here Options None AllowOverride None Order allow,deny Allow from all # image files for foo.org live here Options Indexes Multiviews AllowOverride None Order allow,deny Allow from all ## ## Might not be necessary, but doesn't hurt ## NameVirtualHost 123.45.67.8:80 ## ## domain specific HTML, images, and logs for foo.org ## ServerAdmin webmaster@foo.org DocumentRoot "/usr/local/apache/foo-docs" ErrorLog logs/error_log.foo CustomLog logs/access_log.foo combined Alias /images /usr/local/apache/foo-docs/images ## ## domain specific HTML and logs for bar.org ## ServerAdmin webmaster@bar.org DocumentRoot "/usr/local/apache/bar-docs" ErrorLog logs/error_log.bar CustomLog logs/access_log.bar combined ===== end snippet -- Best Regards, Eric Johnson (eric@coding-zone.com && http://www.coding-zone.com) /home/eric [eric@coding-zone]$ /usr/games/fortune -s Whether you can hear it or not The Universe is laughing behind your back -- National Lampoon, "Deteriorata" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message