aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/apache/manifests/init.pp15
-rw-r--r--modules/apache/templates/vhost_catalyst_app.conf13
2 files changed, 28 insertions, 0 deletions
diff --git a/modules/apache/manifests/init.pp b/modules/apache/manifests/init.pp
index 63b1878d..2bbf03f4 100644
--- a/modules/apache/manifests/init.pp
+++ b/modules/apache/manifests/init.pp
@@ -53,4 +53,19 @@ class apache {
ensure => installed
}
}
+
+ define vhost_catalyst_app($script, $process = 4, $force_ssl = false) {
+
+ include apache::mod_fastcgi
+
+ 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_catalyst_app.conf")
+ }
+ }
}
diff --git a/modules/apache/templates/vhost_catalyst_app.conf b/modules/apache/templates/vhost_catalyst_app.conf
new file mode 100644
index 00000000..29ca7c74
--- /dev/null
+++ b/modules/apache/templates/vhost_catalyst_app.conf
@@ -0,0 +1,13 @@
+<VirtualHost *:80>
+ ServerName <%= vhost %>
+ # Serve static content directly
+ DocumentRoot /dev/null
+
+ Alias <%= script %>/ /
+ FastCgiServer <%= script %> -processes <%= process %> -idle-timeout 30
+
+ <Location />
+ Allow from all
+ </Location>
+</VirtualHost>
+