From owner-freebsd-questions@FreeBSD.ORG Fri Mar 12 10:15:33 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D02B16A4CE for ; Fri, 12 Mar 2004 10:15:33 -0800 (PST) Received: from web40603.mail.yahoo.com (web40603.mail.yahoo.com [66.218.78.140]) by mx1.FreeBSD.org (Postfix) with SMTP id 011CE43D41 for ; Fri, 12 Mar 2004 10:15:33 -0800 (PST) (envelope-from deesto@yahoo.com) Message-ID: <20040312181532.61323.qmail@web40603.mail.yahoo.com> Received: from [66.133.138.130] by web40603.mail.yahoo.com via HTTP; Fri, 12 Mar 2004 10:15:32 PST Date: Fri, 12 Mar 2004 10:15:32 -0800 (PST) From: John DeStefano To: Peter Risdon In-Reply-To: <4051FD7D.2090600@circlesquared.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-questions@freebsd.org Subject: Re: vhosts X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Mar 2004 18:15:33 -0000 --- Peter Risdon wrote: Hi Peter, > John DeStefano wrote: > > >My dear, fellow BSD enthusiasts, > >I realize this is not an isolated BSD question, but I know many of > you > >use apache, and I wonder if this is a problem you might quickly > >recognize, or if another configuration file might be worth looking > at. > > > >I'm trying to host two domains on one box with one IP (both LAN and > >WAN). When a user tries to visit any of the server aliases for the > >second Vhost, they are always brought to the first host instead. > >Note: I'm forwarding WAN port 10101 to LAN port 80, but I don't > think > >that has an effect here. > > > >The relevent section of my httpd.conf file: > > > >#NameVirtualHost *:80 > > > > > Uncomment this. > Thanks... but if you look below, it's already un-commented... > PWR. > > ># > ># VirtualHost example: > ># Almost any Apache directive may go into a VirtualHost container. > ># The first VirtualHost section is used for requests without a known > ># server name. > ># > ># > ># ServerAdmin webmaster@dummy-host.example.com > ># DocumentRoot /www/docs/dummy-host.example.com > ># ServerName dummy-host.example.com > ># ErrorLog /var/log/dummy-host.example.com-error_log > ># CustomLog /var/log/dummy-host.example.com-access_log common > ># > >NameVirtualHost *:80 ^^^ here! > > > >ServerName www.thedestefanos.com > >ServerAlias thedestefanos.com *.thedestefanos.com > >DocumentRoot /usr/www > > > > > > > >ServerName www.thechocolateshack.com > >ServerAlias thechocolateshack.com *.thechocolateshack.com > >chocolateshack.com *.chocolateshack.com > >DocumentRoot /usr/www/thechocolateshack > > > > BTW, here's some more info that may throw a light switch in a brain somewhere: # apachectl -S VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: *:80 is a NameVirtualHost default server www.thedestefanos.com (/usr/local/etc/apache2/httpd.conf:1100) port 80 namevhost www.thedestefanos.com (/usr/local/etc/apache2/httpd.conf:1100) port 80 namevhost www.thechocolateshack.com (/usr/local/etc/apache2/httpd.conf:1106) Syntax OK # tail /var/log/httpd-error.log [Fri Mar 12 10:29:23 2004] [error] [client 195.146.247.190] File does not exist: /usr/www/uri-res (what would refer to "uri-res"??) > >Thanks very much for your help, as always. > >~John __________________________________ Do you Yahoo!? Yahoo! Search - Find what you’re looking for faster http://search.yahoo.com