Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jul 1999 14:18:16 nzst
From:      "Dan Langille" <junkmale@xtra.co.nz>
To:        questions@freebsd.org
Subject:   Order of virtual hosts in httpd.conf does matter
Message-ID:  <379fb9e8.2b26.0@actrix.gen.nz>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?379fb9e8.2b26.0>