Red Hat Bugzilla – Bug 130248
httpd needs to have a sensible default VirtualHost explicitly defined
Last modified: 2007-11-30 17:10:47 EST
# Load config files from the config directory "/etc/httpd/conf.d".
near the top of the httpd.conf, causes significant grief under
certain circumstances. This is because the first VirtualHost becomes
the default VirtualHost for any unmatched entries. The config
shipped by fedora ought to have a _default_ Virtualhost to guard
The breakage becomes apparent when an include file such
as "awstats.conf" is put in conf.d/ as this now becomes the default
page for non-specified hosts.
Ideally one of two things could be done to fix this:
1. Create a "false" <Virtualhost> with the name aaaa.conf and put a
temporary host in here such as the "Your Apache server is not
2. Set a default host _above_ the Include statement in httpd.conf
3. Move Include.d/ down further in the config file (say, at the very
I suggest that (2) is the easiest and best way to deal with this and
thus make apache more tolerant of config problems.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Set up Virtualhosts
2. Point an IP address at the box, but do not configure a Virtualhost
3. View in browser
Expected Results: The standard "Apache is not configured" page would
be just fine as a default.
I'm not really confinced by this argument. If awstats.conf is coming
from an awstats package, why is it changing with vhost setup?
Moving "Include conf.d/*.conf" around causes problems for other
modules, we moved it to this position to satisfy mod_jk2, IIRC.
In more than one project, I have seen <Virtualhost> directives placed
in files which are put into this directory to be included by apache.
On reflection it seems that this is not the intention and that
<Virtualhost> directives ought not to be put in here...is that
correct? If so, perhaps it would be an idea to state this explicitly
in the README file in the directory itself.
I still think it would be a simple enhancement set a default host at
the bottom of httpd.conf though ;-)
It wouldn't be simple though.
would be wrong when the admin changed the default Listen port, for
instance. I think it's better to stick to "as simple as possible".
As above: unconvinced that this needs to change.