httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <>
Subject Re: [users@httpd] Name based virtual host bug after Apache restart
Date Wed, 13 Jan 2010 14:46:36 GMT
On Wed, Jan 13, 2010 at 2:39 PM, Chirouze Olivier
<> wrote:
> Hi,
> After some years out of the Apache discussion, I'm back for a quite specific
> question... ;-)
> We have been running Apache HTTP Server 2.0 for some years now. Everything
> works fine as expected but I think we encounter something that can only be a
> bug.
> We are using _name based virtual hosts_ and mod_rewrite. Each virtual host
> is defined in a specific conf file that is included by httpd.conf
> Let's say:
> FileA:
> <VirtualHost ip:port>
> ServerName
> ServerAlias
> [...]
> </VirtualHost>
> FileB:
> <VirtualHost ip:port>
> ServerName
> ServerAlias
> [...]
> </VirtualHost>
> (yes, I'm talking about same ip:port)
> One day started not to work properly: requests to,
> say  didn't go to FileB, but were treated by httpd.conf.
> We could see that in log files. A simple restart and the problem was fixed.
> A few weeks later, the problem reoccured and we realized it happend just
> after a restart we had done (without changing FileB at all).
> Today we realized we had the problem again: I double checked logs and saw it
> started after a restart I made. I tested that requests to worked,
> _not_ they were treated by httpd.conf and ended as "forbidden"
> (because of course the proper Rewrite rules are in the appropriate
> virtualhost).
> In a word: _sometimes_ when we restart Apache, one of our many
> servernames/aliases doesn't go to the proper virtualhost, it is treated by
> httpd.conf.
> Answers to some questions you might ask:
> - we are running 2.0.58
> - This is _always the same servername_ that fails.
> - the actual servername that bugs is of the form
> (something with the double country extension?? - we do
> have other servers of the form,, etc and they work as expected)
> - I checked that the servername appears only in the proper virtual host
> - I verified that DNS resolution stayed correct: the IP is always the one
> from the correct virtualhost, it SHOULD work.
> - note that a serveralias in the same virtualhost still works: in fact, it's
> ServerName and ServerAlias
> goes to the correct virtualhost, doesn't.
> - originaly the servername was one of many serveraliases in a virtualhost.
> We extracted it to a separate virtualhost and conf file but the problem
> still occurs.
> Any idea???
> Thanks!
> Olivier

What does ``httpd -S -f /path/to/conf'' say about this vhost?

Is the vhost that it ends up going to the default vhost? Ie the first
encountered when parsing the conf file.
This would indicate that the requested hostname didn't match any other
applicable vhost.

The one weird thing in your config is that you are specifying an
ip:port for your vhosts. Are you using _solely_ name based virtual
hosting? If so, I would configure the vhosts with ``<VirtualHost
*:80>'' (and obviously, ``NameVirtualHost *:80'' in the appropriate
place) rather than a specific ip:port.



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