Bug#512344: apache2: Default vhost isn't default vhost
Package: apache2.2-common
Version: 2.2.11-2
Severity: normal
Hi
The first vhost found in a system is the default vhost that will be used if nothing else matches. However, given the current apache2.conf file, the "default" is not the default at all.
user@host-->grep -v "^#.*" apache2.conf | grep -i include
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
Include /etc/apache2/httpd.conf
Include /etc/apache2/ports.conf
Include /etc/apache2/conf.d/
Include /etc/apache2/sites-enabled/
If something is in the httpd.conf file, that will be the default, but per the apparent directory structure, it's supposed to be in the sites-enabled directory. There was even an attempt to make the default load first by prepending zeros to the symlink file. The problem is that this Include directory is LAST in order, instead of first.
I would recomend that the default apache2.conf file be ordered like so;
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
Include /etc/apache2/ports.conf
Include /etc/apache2/httpd.conf
Include /etc/apache2/sites-enabled/
Include /etc/apache2/conf.d/
Note that I moved the ports.conf file too, just on personal opinion about how I use it.
-- Package-specific info:
List of enabled modules from 'apache2 -M':
alias auth_basic auth_pam authn_file authz_default authz_groupfile
authz_host authz_user autoindex cgi deflate dir env mime
negotiation php5 setenvif status
-- System Information:
Debian Release: 5.0
Architecture: i386 (i686)
Kernel: Linux 2.6.23.11-sor-2007121501 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages apache2 depends on:
ii apache2-mpm-prefork 2.2.11-2 Apache HTTP Server - traditional n
apache2 recommends no packages.
apache2 suggests no packages.
Versions of packages apache2.2-common depends on:
ii apache2-utils 2.2.11-2 utility programs for webservers
ii libapr1 1.2.12-5 The Apache Portable Runtime Librar
ii libaprutil1 1.2.12+dfsg-8 The Apache Portable Runtime Utilit
ii libc6 2.7-18 GNU C Library: Shared libraries
ii libmagic1 4.26-2 File type determination library us
ii libssl0.9.8 0.9.8g-15 SSL shared libraries
ii libuuid1 1.41.3-1 universally unique id library
ii lsb-base 3.2-20 Linux Standard Base 3.2 init scrip
ii mime-support 3.44-1 MIME files 'mime.types' & 'mailcap
ii net-tools 1.60-22 The NET-3 networking toolkit
ii perl 5.10.0-19 Larry Wall's Practical Extraction
ii procps 1:3.2.7-11 /proc file system utilities
ii zlib1g 1:1.2.3.3.dfsg-12 compression library - runtime
-- no debconf information
Reply to: