Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 14300 invoked from network); 9 Nov 2009 20:29:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Nov 2009 20:29:40 -0000 Received: (qmail 45224 invoked by uid 500); 9 Nov 2009 20:29:35 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 45169 invoked by uid 500); 9 Nov 2009 20:29:35 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 45114 invoked by uid 99); 9 Nov 2009 20:29:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Nov 2009 20:29:35 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Nov 2009 20:29:33 +0000 Received: from localhost (localhost [127.0.0.1]) by tor.combios.es (Postfix) with ESMTP id 8B1EE226097 for ; Mon, 9 Nov 2009 21:29:11 +0100 (CET) Received: from tor.combios.es ([127.0.0.1]) by localhost (tor.combios.es [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lZ6e6bpxnycw for ; Mon, 9 Nov 2009 21:29:11 +0100 (CET) Received: from [192.168.245.129] (montserrat.wissensbank.com [212.85.37.175]) by tor.combios.es (Postfix) with ESMTPA id 4A79A226096 for ; Mon, 9 Nov 2009 21:29:11 +0100 (CET) Message-ID: <4AF87B97.3070602@ice-sa.com> Date: Mon, 09 Nov 2009 21:29:11 +0100 From: =?UTF-8?B?QW5kcsOpIFdhcm5pZXI=?= Reply-To: users@httpd.apache.org User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: users@httpd.apache.org References: <20155343.103.1257791386457.JavaMail.root@mail.mtharley.com> In-Reply-To: <20155343.103.1257791386457.JavaMail.root@mail.mtharley.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [users@httpd] Apache shows code when using IP address Tanner Bachman wrote: > So far everything seems to be working normally. I'm aware of Apache using the first VirtualHost directive as the default...and that's fine with me. Since the sites hosted on this server both belong to the same company, I'd rather have it default to the public site if the IP address is used. The main problem was the Servlet Container (Resin) tied to Apache. It wasn't defaulting to the first VirtualHost like Apache does, so it would just spit the code directly back to Apache and display it. Once I told it how to handle the IP address...all was right with the world. :) > > I didn't, however, ever think about adding an extra zero into the IP address. Great idea! > > Here are the results of my test (using 10.10.010.200 as my test IP) > > Firefox 3.5.5 - Gives a stock "Problem loading page" message. > IE 8 - Converts it too 10.10.8.200 and then sends it through Google. > Safari 3.1.2 - Gives a stock "Can't open the page" message. > Opera 9.62 - Also gives a stock error message. > Did you try to use your real IP (modified with an extra 0) ? or isn't it one that lends itself to this ? When I do that with my (real) IP address, I do get my default host. The IP I am using is like xxx.yyy.38.zzz, and I change the 38 to 038. But neither with FF 3.5 nor IE 7 does it interpret 038 as octal (which, granted, would be kind of difficult). Unfortunately, I do not have right now an IP available to test with, where the octal conversion would be possible. What happens in fact is that the server takes the IP address as given (and which arrives in a "Host:" header) /as a string/, and compares that string to the various ServerName and ServerAlias, thus defaulting to the default host most of the time. To get back to your case, my personal view is that letting things "default", is running a risk of forgetting this after a while, and then get into some kind of vicious unplanned situation some day in the future, when you make what you believe is a harmless change. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org