[CentOS-docs] document proposal: TipsAndTricks/ApacheVHostDir

Fri Aug 21 21:31:30 UTC 2009
Manuel Wolfshant <wolfy at nobugconsulting.ro>

On 08/22/2009 12:12 AM, Ed Heron wrote:
> From: "Brian Mathis", Friday, August 21, 2009 1:52 PM
>> On Fri, Aug 21, 2009 at 3:41 PM, Ed Heron<Ed at heron-ent.com> wrote:
>>> ...
>>> I've written a quick little article detailing how to create a vhost
>>> directory under CentOS.
>>> ...
> I always figured that the "CentOS way" to handle that was to put them
> into the conf.d folder.  Is there an advantage to using this method?
> One thing I can think of is that the conf.d is included in the middle
> of the httpd.conf file, while this would be at the bottom.
>   That is exactly my reasoning.  The config file, as distributed, has the 
> virtual host containers at the end of the file.
No, the config file as distributed has - just like the original apache 
config - an example at the end of it.

>   Using a separate vhost 
> directory maintains this.
I am sorry, but it seems that you did not understand the question that 
all of us have asked. THERE EXISTS ALREADY a directory meant for storing 
the config files. The only difference between your proposal and the 
default config is that your "#include" line is added at the end of 
httpd.conf, while the existing one is somewhere upper. By accident, one 
can also add the definitions for virtual host containers to the end of 
the same httpd.conf file, but this is by no means a recommended or 
enforced method. It is just _a_ method (among others) and nothing more. 
Look for instance into the way the phpmyadmin [1], bugzilla  [2] or 
mantis [3] packages do their installation step.
To cut it short: you are just reinventing the wheel, except for the fact 
that you are coloring it with a different color. (And you have chosen a 
less than optimal way to tell apache that the config has been modified )

=> the sections %install and %files
[2] http://cvs.fedoraproject.org/viewvc/rpms/bugzilla/EL-5/ => 
[3] http://cvs.fedoraproject.org/viewvc/rpms/mantis/EL-5/ =>