From owner-freebsd-questions@FreeBSD.ORG Wed Jan 9 16:25:04 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD21516A41B for ; Wed, 9 Jan 2008 16:25:04 +0000 (UTC) (envelope-from freebsd08@dfwlp.com) Received: from pollux.dfwlp.com (rrcs-64-183-212-244.sw.biz.rr.com [64.183.212.244]) by mx1.freebsd.org (Postfix) with ESMTP id 6DB0D13C4EA for ; Wed, 9 Jan 2008 16:25:04 +0000 (UTC) (envelope-from freebsd08@dfwlp.com) Received: from citation.local ([192.168.125.142]) (authenticated bits=0) by pollux.dfwlp.com (8.13.8/8.13.8) with ESMTP id m09GOv3b076735; Wed, 9 Jan 2008 10:24:57 -0600 (CST) (envelope-from freebsd08@dfwlp.com) Message-ID: <4784F558.4030107@dfwlp.com> Date: Wed, 09 Jan 2008 10:24:56 -0600 From: Jonathan Horne User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: zbigniew szalbot , freebsd-questions@freebsd.org References: <4784EF9C.8040307@szalbot.homedns.org> <8d23ec860801090803v53b19441h37f75b03324a5adf@mail.gmail.com> <4784F23A.9060301@szalbot.homedns.org> In-Reply-To: <4784F23A.9060301@szalbot.homedns.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=3.6 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on pollux.dfwlp.com Cc: Subject: Re: apache virtual directories / VirtualHost overlap X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2008 16:25:04 -0000 zbigniew szalbot wrote: > Hello, > > Schiz0 pisze: >> On Jan 9, 2008 11:00 AM, zbigniew szalbot >> wrote: >> > Hello, >> > >> > Can you help me solve what probably is a very simple problem with >> > virtual directories. I need to define two different virtual hosts for >> > the same IP. >> > >> > So I defined: >> > >> > NameVirtualHost 83.19.156.210 >> > >> > >> > ServerAdmin webmaster@dummy-host.example.com >> > DocumentRoot /usr/local/www/data/ >> > ServerName lists.lc-words.com >> > ErrorLog /var/log/httpd-error.log >> > CustomLog /var/log/httpd-access.log common >> > >> > >> > >> > ServerAdmin webmaster@dummy-host.example.com >> > DocumentRoot /usr/local/www/data/blog/ >> > ServerName blog.lc-words.com >> > ErrorLog /var/log/httpd-error.log >> > CustomLog /var/log/httpd-access.log common >> > >> > >> > However, when I restart apache, I get: >> > [Wed Jan 09 16:59:34 2008] [warn] _default_ VirtualHost overlap on port >> > 80, the first has precedence >> > >> > What do I need to change to make it right? >> > >> > Many thanks! >> > >> > Zbigniew Szalbot >> > _______________________________________________ >> >> Try adding the port to the IP addresses. For example: >> >> NameVirtualHost 83.19.156.210:80 >> >> And also for the other VirtualHost block too. >> > > I actually solved it by following advice from: > http://httpd.apache.org/docs/2.0/vhosts/name-based.html > > However, the problem is that the blog.lc-words.com does not serve the > site I want it to serve. But instead serves the default site which is > lists.lc-words.com > > Thanks! > > ZS > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" if it were me, id move the blog directory up on, to /usr/local/www/blog. otherwise, what apache is telling you, is that "if the configuration even worked", that someone could view the content of blog as if it were a directory of the top level's site. along with moving the directory up one (and editing the virtual host's line to reflect the move), add the folder as a 'Directory statement' in your configuration: AllowOverride None Order Allow,deny Allow from all hth, -- Jonathan Horne http://dfwlpiki.dfwlp.org freebsd08 _@_ dfwlp.com