[CentOS-docs] document proposal: TipsAndTricks/ApacheVHostDir

Ed Heron Ed at Heron-ent.com
Mon Aug 24 17:22:31 UTC 2009


From: "Christoph Maser", Sunday, August 23, 2009 1:57 AM

> Am Sonntag, den 23.08.2009, 09:34 +0200 schrieb Christoph Maser:
>>  But what
>> i really expect from a TipsAndTricks/ApacheVhost is to explain how to
>> make sure which vhost will be the default vhost when using includes.
>> ...
>
> Oh you have that also i found it on the wiki changelog.
> http://wiki.centos.org/EdHeron/Apache-vhost-default why did you put that
> in a seperate article? You describe 2 ways of doing it (httpd.conf and
> vhost.d) but where is the centos-way (using only conf.d) ?

  I changed the suggested name of Apache-vhost-default to 
ApacheVhostDefault.  You've probably noticed the separate proposal for it by 
now.

  Actually, I was setting up a new server with some websites on it and 
mistyped something, which led to the first valid host being displayed when I 
was testing everything.  I played with a few methods of catching a bad 
website name and displaying the main host.  Since I hadn't seen something 
like it before, I decided to write an article.  While writing the article, I 
realized that my vhost directory was not documented.  It seemed that there 
wasn't an official method of using include files to define virtual hosts.  I 
decided against the common method of using conf.d because it resulted in 
virtual hosts being defined with modules.  Since the distributed httpd.conf 
file had the virtual hosts at the end of the file and I wanted to use 
external files, I decided to extend the existing conf.d setup to a new 
directory.  I decided to make them separate files because the ApacheVhostDir 
is not required reading for ApacheVhostDefault (if you don't have external 
files).  I thought it would be easier for multiple authors to maintain 
multiple documents (I'm assuming there will be other Apache TipsAndTricks)

  I'm suggesting that putting virtual host files in conf.d is a shortcut and 
not 'proper'.  It may work fine and I'm not suggesting people can't take 
shortcuts, but putting the virtual host files in conf.d changes the order of 
configuration items from the Apache distribution.

  Kind of like stop signs.  The proper thing to do is come to a full and 
complete stop, whether there is anybody around or not.  The common 
application is to slow to less than 5 mph and verify that there isn't any 
chance of accident or citation, then continue.  Certainly, if a driving 
instructor taught the shortcut method, they'd get sued at some point, so 
they teach the proper method and pretend not to notice if the student takes 
the shortcut outside of class.

  Also, I'm not suggesting that we change the CentOS distribution.  A 
vhost.d directory is just a user-installable option.



More information about the CentOS-docs mailing list