aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2011-01-09 11:15:08 +0000
committerMichael Scherer <misc@mageia.org>2011-01-09 11:15:08 +0000
commit5f1d2fcc1efd2020c46ae685a668906e84d77a17 (patch)
treec33ae93ca8d98350b5c06f9bfe7fb6886d73fc8d
parentecd3e94f8e09513a0f294c264ec79e906a2dba1a (diff)
downloadpuppet-5f1d2fcc1efd2020c46ae685a668906e84d77a17.tar
puppet-5f1d2fcc1efd2020c46ae685a668906e84d77a17.tar.gz
puppet-5f1d2fcc1efd2020c46ae685a668906e84d77a17.tar.bz2
puppet-5f1d2fcc1efd2020c46ae685a668906e84d77a17.tar.xz
puppet-5f1d2fcc1efd2020c46ae685a668906e84d77a17.zip
add vhost_simple, for handling simple checkout ( php, static website )
-rw-r--r--modules/apache/manifests/init.pp13
-rw-r--r--modules/apache/templates/vhost_simple.conf9
2 files changed, 22 insertions, 0 deletions
diff --git a/modules/apache/manifests/init.pp b/modules/apache/manifests/init.pp
index 407e2ca2..c98e2234 100644
--- a/modules/apache/manifests/init.pp
+++ b/modules/apache/manifests/init.pp
@@ -164,6 +164,19 @@ class apache {
}
}
+ define vhost_simple($location) {
+ include apache::base
+ file { "$name.conf":
+ path => "/etc/httpd/conf/vhosts.d/$name.conf",
+ ensure => "present",
+ owner => root,
+ group => root,
+ mode => 644,
+ notify => Service['apache'],
+ content => template("apache/vhost_simple.conf")
+ }
+ }
+
define webapp_other($webapp_file) {
include apache::base
$webappname = $name
diff --git a/modules/apache/templates/vhost_simple.conf b/modules/apache/templates/vhost_simple.conf
new file mode 100644
index 00000000..ec39b192
--- /dev/null
+++ b/modules/apache/templates/vhost_simple.conf
@@ -0,0 +1,9 @@
+<VirtualHost *:80>
+ ServerName <%= name %>
+ DocumentRoot <%= location %>
+
+ <Location />
+ Allow from all
+ </Location>
+</VirtualHost>
+