
joshua at slive
Sep 24, 2007, 1:28 PM
Post #4 of 4
(953 views)
Permalink
|
|
Re: Clarification on NameVirtualHost and VirtualHost sections
[In reply to]
|
|
On 9/22/07, Michael Rasmussen <mikeraz [at] patch> wrote: > Joshua Slive wrote: > > > If a <VirtualHost> block does not contain a ServerName statement the hostname > > > of the computer will be used. > > > > Not quite. It should be "Each <VirtualHost> block should contain a > > ServerName. If it is absent, the ServerName from the main server > > configuration will be used." Committed something like this to trunk and will backport to 2.2. > > Unless there's no ServerName in the main server configuration. Then it pulls > the hostname. Ubunutu, for example, defaults to this situation. It uses the default ServerName, which is indeed taken from the hostname. This is actually an Ubuntu bug if they have no ServerName in the main server context, because this forces Apache to do a reverse DNS lookup at startup, needlessly placing a dependency on DNS. All apache configs should have a main context ServerName, even if you know it will never be used for anything. Joshua. --------------------------------------------------------------------- To unsubscribe, e-mail: docs-unsubscribe [at] httpd For additional commands, e-mail: docs-help [at] httpd
|