aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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>
+