httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <>
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: <>
Date: Fri, 27 Sep 1996 07:57:31 -0400
From: Joel Shprentz <>
Organization: BDM International, Inc.
X-Mailer: Mozilla 3.0 (Win95; I)
MIME-Version: 1.0
Newsgroups: comp.infosystems.www.servers.unix
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, since early
this year.  Apache has performed excellently.

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

I reorganized the Apache configuration files to define two virtual
hosts, and, 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
with an old X-Windows version of Mosaic and was denied access to the home page (and all other 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, was a type 1 virtual host, which worked consistently.
was a type 2 virtual host, which worked from Netscape, but not from

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.
1501 BDM Way
McLean, VA 22102

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

Rob Hartill (  ... why wait for a clear night to see the stars?.

View raw message