aboutsummaryrefslogtreecommitdiffstats
path: root/modules/apache
diff options
context:
space:
mode:
Diffstat (limited to 'modules/apache')
-rw-r--r--modules/apache/manifests/init.pp7
-rw-r--r--modules/apache/templates/vhost_base.conf9
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 />