Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 68526 invoked from network); 20 Aug 2008 08:17:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Aug 2008 08:17:47 -0000 Received: (qmail 43871 invoked by uid 500); 20 Aug 2008 08:17:36 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 43856 invoked by uid 500); 20 Aug 2008 08:17:36 -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 43845 invoked by uid 99); 20 Aug 2008 08:17:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Aug 2008 01:17:36 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=NORMAL_HTTP_TO_IP,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [212.85.38.174] (HELO popeye.combios.es) (212.85.38.174) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Aug 2008 08:16:36 +0000 Received: from [192.168.250.50] (p549EB416.dip0.t-ipconnect.de [84.158.180.22]) (authenticated bits=0) by popeye.combios.es (8.13.8/8.13.8/Debian-3) with ESMTP id m7K8GuaM019268 for ; Wed, 20 Aug 2008 10:16:57 +0200 Message-ID: <48ABD2B8.1010708@ice-sa.com> Date: Wed, 20 Aug 2008 10:15:52 +0200 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: users@httpd.apache.org References: <536170.87481.qm@web52704.mail.re2.yahoo.com> In-Reply-To: <536170.87481.qm@web52704.mail.re2.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on popeye.combios.es X-Virus-Scanned: ClamAV 0.92.1/8058/Tue Aug 19 17:20:36 2008 on popeye.combios.es X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-97.9 required=2.5 tests=NORMAL_HTTP_TO_IP, RCVD_IN_PBL,RCVD_IN_SORBS_DUL,USER_IN_WHITELIST autolearn=no version=3.2.3 Subject: Re: [users@httpd] Any url will revert to the document root Luc Landreville wrote: > Greetings; > > I host a website using apache on CentOS Linux. I am experiencing the fllowing problem: > > Any file name added after the domain name in the address field of a browser is ignored and the site's home page is displayed: > > If I type http://www.mydomain.com/pt/index.html , apache will systematically display the root directory index.html file (http://www.mydomain.com/index.html) with the folling entry from the log file: > [19/Aug/2008:18:18:57 -0400] "GET / HTTP/1.1" 200 5150 "http://www.mydomain.com.com/pt/index.html"; "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16" > > > However, if I enter the ip address ( http://99.99.99.99/pt/index.html) , I get the expected file from the server with the following entry in the log file: > [19/Aug/2008:18:24:37 -0400] "GET /pt/index.html HTTP/1.1" 200 5294 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16" > Can you post your whole httpd.conf file ? It sounds like some issue of mismatch in virtual server names, or like some configuration issue in the virtual server "www.mydomain,com", but it's hard to tell what just by your report above. If you want to figure it out for yourself, the point is probably this : I assume that you do not actually have a line in your configuration saying ServerName 99.99.99.99 So, what happens when you send a request to "http://99.99.99.99", is this : - the request arrives at the Apache server - Apache tries to match the request hostname (99.99.99.99) to one of the "ServerName" or "ServerAlias" in the various Virtual Servers defined. - it fails, because there is no such ServerName or ServerAlias anywhere - thus, it defaults to the first Virtual Server defined in your configuration, whatever that is, and applies the rules there. (the very first section acts as a default for any hostname that Apache cannot find a real match for) On the other hand, when you send a request to "http://www.mydomain.com", then what happens is this : - the request arrives at the Apache server - Apache tries to match the request hostname (www.mydomain.com) to one of the "ServerName" or "ServerAlias" in the various Virtual Servers defined. - it succeeds, because there exists a section where there is a "ServerName www.mydomain.com" line. - thus, apache uses that (other) virtual server configuration to serve the request, and applies the rules there I can thus only imagine that the rules applied in the www.mydomain.com case, are such that a request to /pt/indx.html in that virtual server, gets "translated" to /index.html. While in the default virtual server, it is not translated. Andr� --------------------------------------------------------------------- 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