diff options
author | Michael Scherer <misc@mageia.org> | 2011-02-01 12:44:53 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2011-02-01 12:44:53 +0000 |
commit | 7d7d2a9230e6224ccf4e40f9848483362eed7f02 (patch) | |
tree | 6e18066b816355db0178173cb6b92f2ed0d96b45 /modules/apache | |
parent | c0a15d49e7cb82ddc8e021e9c23d989de43cfb7f (diff) | |
download | puppet-7d7d2a9230e6224ccf4e40f9848483362eed7f02.tar puppet-7d7d2a9230e6224ccf4e40f9848483362eed7f02.tar.gz puppet-7d7d2a9230e6224ccf4e40f9848483362eed7f02.tar.bz2 puppet-7d7d2a9230e6224ccf4e40f9848483362eed7f02.tar.xz puppet-7d7d2a9230e6224ccf4e40f9848483362eed7f02.zip |
allow to set public_html on a vhost
Diffstat (limited to 'modules/apache')
-rw-r--r-- | modules/apache/manifests/init.pp | 7 | ||||
-rw-r--r-- | modules/apache/templates/vhost_base.conf | 9 |
2 files changed, 15 insertions, 1 deletions
diff --git a/modules/apache/manifests/init.pp b/modules/apache/manifests/init.pp index c3de7720..f070a828 100644 --- a/modules/apache/manifests/init.pp +++ b/modules/apache/manifests/init.pp @@ -105,7 +105,8 @@ class apache { define vhost_base($content = '', $location = '/dev/null', $use_ssl = false, - $vhost = false) { + $vhost = false, + $enable_public_html = false) { if ! $vhost { $real_vhost = $name } else { @@ -120,6 +121,10 @@ class apache { } } + if $enable_public_html { + include apache::mod_public_html + } + $filename = "$name.conf" file { "$filename": path => "/etc/httpd/conf/vhosts.d/$filename", diff --git a/modules/apache/templates/vhost_base.conf b/modules/apache/templates/vhost_base.conf index 266e7c29..486bb964 100644 --- a/modules/apache/templates/vhost_base.conf +++ b/modules/apache/templates/vhost_base.conf @@ -14,6 +14,15 @@ end ServerName <%= real_vhost %> DocumentRoot <%= location %> +<%- if enable_public_html -%> + #TODO add the rest + UserDir public_html +<%- else -%> +<IfModule mod_userdir.c> + UserDir disabled +</IfModule> +<%- end -%> + <%= content %> <Location /> |