diff --git a/REFERENCE.md b/REFERENCE.md
index db0d350e2..539ffcfb3 100644
--- a/REFERENCE.md
+++ b/REFERENCE.md
@@ -4984,6 +4984,7 @@ The following parameters are available in the `zabbix::web` class:
* [`saml_settings`](#-zabbix--web--saml_settings)
* [`puppetgem`](#-zabbix--web--puppetgem)
* [`manage_selinux`](#-zabbix--web--manage_selinux)
+* [`apache_vhost_custom_params`](#-zabbix--web--apache_vhost_custom_params)
##### `zabbix_url`
@@ -5409,6 +5410,14 @@ Whether we should manage SELinux rules.
Default value: `$zabbix::params::manage_selinux`
+##### `apache_vhost_custom_params`
+
+Data type: `Hash[String[1], Any]`
+
+Additional parameters to pass to apache::vhost.
+
+Default value: `{}`
+
### `zabbix::zabbixapi`
This will install the zabbixapi gem.
diff --git a/manifests/web.pp b/manifests/web.pp
index c65109b45..533faaf93 100644
--- a/manifests/web.pp
+++ b/manifests/web.pp
@@ -77,6 +77,7 @@
# @param saml_settings A hash of additional SAML SSO settings.
# @param puppetgem Provider for the zabbixapi gem package.
# @param manage_selinux Whether we should manage SELinux rules.
+# @param apache_vhost_custom_params Additional parameters to pass to apache::vhost.
# @example For multiple host setup:
# node 'wdpuppet02.dj-wasabi.local' {
# class { 'apache':
@@ -143,6 +144,7 @@
Hash[String[1], Variant[ScalarData, Hash]] $saml_settings = $zabbix::params::saml_settings,
$puppetgem = $zabbix::params::puppetgem,
Boolean $manage_selinux = $zabbix::params::manage_selinux,
+ Hash[String[1], Any] $apache_vhost_custom_params = {},
) inherits zabbix::params {
# check osfamily, Arch is currently not supported for web
if $facts['os']['family'] in ['Archlinux', 'Gentoo',] {
@@ -417,6 +419,7 @@
ssl_cipher => $apache_ssl_cipher,
ssl_chain => $apache_ssl_chain,
require => Package[$zabbix_web_package],
+ * => $apache_vhost_custom_params,
}
} # END if $manage_vhost
diff --git a/spec/classes/web_spec.rb b/spec/classes/web_spec.rb
index 2ee26d1c9..06a444c77 100644
--- a/spec/classes/web_spec.rb
+++ b/spec/classes/web_spec.rb
@@ -273,6 +273,16 @@ class { 'apache':
)
}
end
+
+ describe 'with custom vhost params' do
+ let :params do
+ super().merge(
+ apache_vhost_custom_params: {'mdomain': true}
+ )
+ end
+
+ it { is_expected.to contain_apache__vhost('zabbix.example.com').with_mdomain(true) }
+ end
end
end
end