puppet-php icon indicating copy to clipboard operation
puppet-php copied to clipboard

refactor php::apache_vhost

Open Ma27 opened this issue 8 years ago • 3 comments

the current implementation of ::php::apache_vhost is something I'd never use due to the fact that it's a way too limited as the actual resource ::apache::vhost supports a lot more stuff such as custom rewrite rules, but those features are limited because of the wrapper in this module.

I'd suggest to do something like this:

define php::apache_vhost(
  # the current parameters
  $custom = {}
) {
  # validation ...

  ensure_resource('::apache::vhost', $name, deep_merge($custom, {
    # our parameters
  })
}

With something like this we'd be able to gain access to all the features of the ``::apache::vhost` resource.

Ma27 avatar Jun 21 '16 19:06 Ma27

please note that my time is a bit limited right now. I hope that I'll be able to open a PR somehow in the next weeks...

Ma27 avatar Jun 21 '16 19:06 Ma27

Yeah, it's probably way better to just use puppetlabs-apache directly and document that properly. #22 also suggests it wasn't planned for anything else than very simple usage.

mmoll avatar Jun 21 '16 19:06 mmoll

Hi. Do you mean we should use puppetlabs-Apache (instead of this module) when we want to use PHP & Apache together?

Does that mean this module is more suitable with a non-apache Web server, for example nginx?

I'm creating a basic WordPress site and I am still learning. Trying to decide which module(s) I should use. Thank you.

felipe1982 avatar Dec 01 '16 09:12 felipe1982