httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hajo Locke <>
Subject [users@httpd] unexpected behaviour of default host
Date Tue, 29 Dec 2015 19:05:25 GMT
Hello List,

used for years apache 2.2, now trying to upgrade to 2.4 and do some 
I noticed an unexpected behaviour of default host.
like suggested here, i use a minimal default vhost:

In Apache 2.2 we used additional "Servername *", but with 2.4 it is not 
allowed to use wildcards with Servername-Directive.
So we leave it empty like suggested in the docs. First loaded valid 
VHost will be the default host.
I think the missing Servername is internal evaluated and filled with 
hostname of local machine. I did a lot of tests and this is my only 
So this leads to problems when using local hostname in other VHosts as 
Servername, which may lead now to wrong Documentroots. We do it this way 
on a couple of thousend servers. I think this happens also to the guy 
who commented here at bottom of page
To avoid this it seems necessary to add  Servername with an unexisting 
hostname. "ServerName non.existing_host.noTld"

Alltogether i think the 2.4 solution for defaulthosts is quite 
unfortunate. May be there should be used a really Default-Servername to 
mark defaulthost.
At least the docs should be updated and admins should be informed that 
they are "loosing" a usable servername and there is one fault probability.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message