Date: Fri, 26 Jan 2001 19:59:00 -0500 From: Eric Johnson <eric@coding-zone.com> To: treznor@sunflower.com Cc: questions@freebsd.org Subject: Re: Apache question again Message-ID: <20010126195900.A1634@h0040f6849012.ne.mediaone.net> In-Reply-To: <20010127003434.75297.qmail@web10604.mail.yahoo.com>; from millioncheese@yahoo.com on Fri, Jan 26, 2001 at 04:34:34PM -0800 References: <20010127003434.75297.qmail@web10604.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 ## <Directory "/usr/local/apache/foo-docs"> # HTML docs for foo.org go here Options None AllowOverride None Order allow,deny Allow from all </Directory> <Directory "/usr/local/apache/bar-docs"> # HTML docs for bar.org go here Options None AllowOverride None Order allow,deny Allow from all </Directory> <Directory "/usr/local/apache/foo-docs/images"> # image files for foo.org live here Options Indexes Multiviews AllowOverride None Order allow,deny Allow from all </Directory> ## ## Might not be necessary, but doesn't hurt ## NameVirtualHost 123.45.67.8:80 ## ## domain specific HTML, images, and logs for foo.org ## <VirtualHost foo.org:80> 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 </VirtualHost> ## ## domain specific HTML and logs for bar.org ## <VirtualHost bar.org:80> ServerAdmin webmaster@bar.org DocumentRoot "/usr/local/apache/bar-docs" ErrorLog logs/error_log.bar CustomLog logs/access_log.bar combined </VirtualHost> ===== 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010126195900.A1634>