puppetlabs/puppetlabs-apache — pull request #5 by djalden (2011-11-29 20:38:26+00:00)
Title: Feature/master/enhance vhost support

I needed to be able to add (and remove) 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.