From 3ca1def40707b874bd1736327b700ff897a0fe33 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Mon, 8 Nov 2010 00:18:44 +0000 Subject: - add a hook to serve static file with apache directly --- modules/apache/manifests/init.pp | 2 +- modules/apache/templates/vhost_catalyst_app.conf | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/apache') diff --git a/modules/apache/manifests/init.pp b/modules/apache/manifests/init.pp index fefe5a78..e89242f7 100644 --- a/modules/apache/manifests/init.pp +++ b/modules/apache/manifests/init.pp @@ -82,7 +82,7 @@ class apache { } } - define vhost_catalyst_app($script, $process = 4, $use_ssl = false) { + define vhost_catalyst_app($script, $location = '', $process = 4, $use_ssl = false) { include apache::mod_fastcgi diff --git a/modules/apache/templates/vhost_catalyst_app.conf b/modules/apache/templates/vhost_catalyst_app.conf index 254801aa..a3aee804 100644 --- a/modules/apache/templates/vhost_catalyst_app.conf +++ b/modules/apache/templates/vhost_catalyst_app.conf @@ -2,7 +2,9 @@ ServerName <%= name %> # Serve static content directly DocumentRoot /dev/null - +<% if location then %> + Alias /static <%= location %>/root/static +<% endif %> Alias / <%= script %>/ FastCgiServer <%= script %> -processes <%= process %> -idle-timeout 30 -- cgit v1.2.1