puppetlabs/puppetlabs-apache — pull request #6 by djalden (2011-11-29 21:01:27+00:00)
Title: add vhost configuration directory support

I needed to be able to add various directives inside of a virtualhost definition based upon which modules were being installed. For example, I needed to add in aliases for one vhost that I don’t want on the other virtual hosts. I decided that the best way to handle this was to create a per-virtual-host configuration directory that stores directives for that virtual host.

This patch adds the following inside of the VirtualHost definition:

include ${vdir}/vhosts/${priority}–${name}/*.conf

and it creates the specified directory (leaving it empty). Now you can have other modules drop config files into the specified directory to get additional directives (aliases for example) inside of the virtualhost definition.

I realize I could have done this by specifying a different template, but I thought this might be a feature that others find useful.