[CentOS-docs] doc?: TipsAndTricks/ApacheVHostDir

Ed Heron

Ed at Heron-ent.com
Thu Sep 3 19:52:31 UTC 2009

From: "Filipe Brandenburger", Thursday, September 03, 2009 12:56 PM

> ...
>Your Wiki page reads "The issue with [using conf.d/] is that, since
>the files in conf.d/ are included with the module configuration files,
>the virtual host definitions would come before other options that
>could effect them. It is unclear whether the virtual host inherits the
>configuration items defined after the virtual host is defined."
>That is not true, VirtualHost sections will inherit everything that is
>in the main config file, independent of being before or after the
>virtual host definition.

>There is an evidence of that in Apache documentation:
>"Sections inside <VirtualHost> sections are applied after the
>corresponding sections outside the virtual host definition. This
>allows virtual hosts to override the main server configuration."
>(in http://httpd.apache.org/docs/2.2/sections.html)

  Thanks for the reference!

  OK.  That helps.  That page seems to be saying that the configuration 
options are stored (reordered) and possibly only processed when a request is 

  I still like my method and the other parts of my argument, but I can see 
that putting virtual host config files in conf.d is not invalid or risky.

  Give me a few.  I'll modify my page to take my new world view into 

>The only thing that matters on position of VirtualHosts in the config
>file is their relative position to other VirtualHosts used to
>determine which one of them will be the default, and there I believe
>your other page gives two very interesting tips on how to define that.

  Thanks!  At least I'm not 'just' annoying everyone...


More information about the CentOS-docs mailing list