httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] Apache2: rewrite strangeness and _default_ virtual hosts
Date Sun, 22 Aug 2004 14:01:00 GMT
On Sun, 22 Aug 2004 00:42:40 -0700, Timothy Martin <> wrote:
> I've struggled with two issues since starting to use Apache2:

It's best to put different issues in different messages.  People tend
to ignore long laundry-list type emails.

For your php problem, there is no point in even looking until you have
carefully examined the output of the RewriteLog with a high

> 2) The second big issue i've had with apache2 is concerning the
> _default_ virtual host. When people visit my site currently by using a
> full hostname which the DNS resolves to my server, yet apache doesn't
> have a name-based virtual host for ( for instance) it
> sends them to the first virtual host defined, just like apache docs
> specify. I didn't want this, so i thought i'd use the _default_ host as
> explained in the docs. Problem is, if i place the _default_ host
> anywhere in my configuration it ALWAYS sends ALL clients to that
> documentroot rather than to the specific hosts that the users may have
> specified.
> The documentation clearly states, "A default vhost never serves a
> request that was sent to an  address/port that is used for name-based
> vhosts." But this is clearly not the case with my configuration. As
> soon as i add the _default_ it sends all traffic there regardless of
> the other virtualhosts.

Perhaps this happens when you use the * argument to the
NameVirtualHost directive rather than a specific IP.  I agree it
doesn't match the docs, but the spirit remains the same: never use
_default_ when doing name-based virtual hosting.

As it says here:
if you want a "default" name-based vhost to match all
not-otherwise-matched names, just create another name-based
<VirtualHost> section, give it a dummy ServerName (or use the IP
address as the ServerName) and list it first in the config file.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message