httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
Subject Re: [users@httpd] VirtualHost _default_:* not working?
Date Tue, 03 Jun 2003 21:16:22 GMT

On Tue, 3 Jun 2003, Forrest Aldrich wrote:

>
> I'm trying to set a catch-all page that will be displayed, should something
> be pointed to my server (which hosts a few pages) for which it has no
> content.  For example, there might be a valid dns record that points here,
> but the page isn't hosted any longer, thus I want a 404 to come up (and
> will add more detail later, once I get this working).
>
> So, in the Apache Server Unleashed book, it explains the use of the
> _default_:* directive.  I set this to:

> All of the VirtualHost entries I have are via NameVirtualHost, ie: they
> have the same IP, but different ServerName entries.

The _default_ virtual host catches requests only for hosts that have no
matching IP address.  If you want a default name-based virtual host (one
that catches unrecognized hostnames) then simply create a new
<VirtualHost> block with the same IP as your NameVirtualHost directive,
give it a random ServerName, and list it first in your config file.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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


Mime
View raw message