From owner-freebsd-questions Wed Jul 28 19:19:19 1999 Delivered-To: freebsd-questions@freebsd.org Received: from mail.actrix.gen.nz (mail2.actrix.gen.nz [203.96.16.37]) by hub.freebsd.org (Postfix) with ESMTP id 0F28514FC3 for ; Wed, 28 Jul 1999 19:19:03 -0700 (PDT) (envelope-from junkmale@xtra.co.nz) Received: from actrix.gen.nz (www@lemuria.actrix.gen.nz [203.96.16.20]) by mail.actrix.gen.nz (8.9.1/8.9.1) with SMTP id OAA17358 for ; Thu, 29 Jul 1999 14:18:16 +1200 (NZST) From: "Dan Langille" Reply-To: junkmale@xtra.co.nz To: questions@freebsd.org Date: Thu, 29 Jul 1999 14:18:16 nzst Subject: Order of virtual hosts in httpd.conf does matter X-Mailer: DMailWeb Web to Mail Gateway 2.1t, http://netwinsite.com/top_mail.htm Message-id: <379fb9e8.2b26.0@actrix.gen.nz> X-User-Info: 202.37.52.5 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I've been meaning to discuss this for some time. I suspect that the ordering of virtual hosts within httpd.conf does matter. I'm basing this guess on log entries and the fact that I'm using name-based virtual hosts on my apache installation. Recently, I added freebsddiary.yi.org to my httpd.conf file. It was appended to the end of the file. Then I found this in the log files for freebsddiary.yi.org: [29/Jul/1999:13:31:07 +1200] "GET / HTTP/1.0" 200 385 "http://www.freebsd.org/support.html" "NetAttache/2.5" The key point is that the referring page http://www.freebsd.org/support.html contains a reference to http://www.nzfug.nz.freebsd.org which is also hosted by my box. So how did the log entry get into that file? I think the clue is the browser, NetAttache. I've not been able to find any details about this browswer, but I suspect that it does not support virtual hosts. Hence apache sees no hostname so, for some reason it uses the last one in the httpd.conf. This theory seems to differ from that found at http://mirror.aarnet.edu.au/apache/docs/vhosts/name-based.html where it states: "As mentioned earlier, there are still some clients in use who do not send the required data for the name-based virtual hosts to work properly. These clients will always be sent the pages from the first virtual host listed for that IP address (the primary name-based virtual host)." Any comments? -- Dan Langille To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message