httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <r...@imdb.com>
Subject Apache virtual host ignores default address; why? (fwd)
Date Fri, 27 Sep 1996 12:49:18 GMT

not acked.

----- Forwarded message from Joel Shprentz -----

Message-ID: <324BC12B.1FF7@bdm.com>
Date: Fri, 27 Sep 1996 07:57:31 -0400
From: Joel Shprentz <shprentz@bdm.com>
Reply-To: shprentz@bdm.com
Organization: BDM International, Inc.
X-Mailer: Mozilla 3.0 (Win95; I)
MIME-Version: 1.0
Newsgroups: comp.infosystems.www.servers.unix
CC: apache-bugs@apache.org
Subject: Apache virtual host ignores default address; why?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Why does Apache 1.1.1, when configured with virtual hosts, ignore
requests addressed to the default IP address of the server?

I have been running Apache on a server, call it old.com, since early
this year.  Apache has performed excellently.

This week, I wanted to add a second site, call it new.com, to our
server.  I'm running with Solaris 2.4, so it was easy to setup a
second IP address for abcd.com on the ethernet interface already
used for new.com.

I reorganized the Apache configuration files to define two virtual
hosts, old.com and new.com, each with its own access.conf and srm.conf
files.  I retained common settings and resources, like Apache's icons,
in shared access.conf and srm.conf files.

It all worked when I tested it with Netscape 3.0.  However, I also
tested
with an old X-Windows version of Mosaic and was denied access to the
old.com home page (and all other old.com pages).

After rereading all the Apache virtual host documentation and trying
some dead-end approaches like ServerAlias, I looked at the source code
(one of Apache's best features).

There I learned that most virtual hosts are flagged with a 1, but
virtual hosts matching the computer's default IP address are flagged
with a 2.  When a request arrives, Apache tries to match request
addresses only with the type 1 virtual host addresses.  At my site,
new.com was a type 1 virtual host, which worked consistently. Old.com
was a type 2 virtual host, which worked from Netscape, but not from
Mosaic.

Requests from newer browsers, like Netscape 3.0, specify the server
address in an HTTP header, which overrides the apparent IP address.
That's why testing from Netscape worked.  

Requests from older browsers, like X-Mosaic 2.4, rely on the TCP/IP
connection to establish the server address.  These older browsers
are affected by the type 1 vs. 2 distinction.

Why was this feature implemented?  Can this feature be described in
the Apache documentation?
--
Joel Shprentz              (202) 863-3121
BDM Federal, Inc.          shprentz@bdm.com
1501 BDM Way
McLean, VA 22102

----- End of forwarded message from Joel Shprentz -----

-- 
Rob Hartill (robh@imdb.com)    
http://www.imdb.com/  ... why wait for a clear night to see the stars?.

Mime
View raw message