puppetlabs-apache
puppetlabs-apache copied to clipboard
Allow to use the same domain multiple times with mod_md
When using mod_md to manage TLS certificates, a domain can only appear once as a parameter of a MDomain configuration.
When a single node configue multiple Virtual Hosts to serve the same website on different IP Addresses or on different ports, and we want to use mod_md to manage the TLS certificate, the current code produce a MDomain entry in each virtual host, leading to configuration error and preventing apache from starting.
This commit rework how the MDomain setting is emitted, and ensure it is only output once even if multiple Virtual Hosts configure the same domain.