aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <dev@blino.org>2017-04-10 16:46:29 +0200
committerOlivier Blin <dev@blino.org>2017-04-10 16:57:02 +0200
commit02ca37a63980a36c20a65548876294ae1a0850f8 (patch)
tree801b9e2dc87533ea20d3bbcf75c4a20eed5e2901
parent14fbc9cec06a1fdb0a4127b0c5a36530292f5ec5 (diff)
downloadpuppet-02ca37a63980a36c20a65548876294ae1a0850f8.tar
puppet-02ca37a63980a36c20a65548876294ae1a0850f8.tar.gz
puppet-02ca37a63980a36c20a65548876294ae1a0850f8.tar.bz2
puppet-02ca37a63980a36c20a65548876294ae1a0850f8.tar.xz
puppet-02ca37a63980a36c20a65548876294ae1a0850f8.zip
apache fcgid: support multiple script aliases
-rw-r--r--modules/apache/manifests/vhost/catalyst_app.pp4
-rw-r--r--modules/apache/templates/vhost_fcgid.conf4
2 files changed, 7 insertions, 1 deletions
diff --git a/modules/apache/manifests/vhost/catalyst_app.pp b/modules/apache/manifests/vhost/catalyst_app.pp
index 5aacf510..1ce40747 100644
--- a/modules/apache/manifests/vhost/catalyst_app.pp
+++ b/modules/apache/manifests/vhost/catalyst_app.pp
@@ -9,6 +9,10 @@ define apache::vhost::catalyst_app( $script,
$aliases['/static'] = "${location}/root/static"
}
+ $script_aliases = {
+ '/' => "$script/",
+ }
+
apache::vhost::base { $name:
vhost => $vhost,
use_ssl => $use_ssl,
diff --git a/modules/apache/templates/vhost_fcgid.conf b/modules/apache/templates/vhost_fcgid.conf
index f97881c2..2dd2c043 100644
--- a/modules/apache/templates/vhost_fcgid.conf
+++ b/modules/apache/templates/vhost_fcgid.conf
@@ -1,4 +1,6 @@
AddHandler fcgid-script .pl
-ScriptAlias / <%= script %>/
+<%- script_aliases.keys.sort {|a,b| a.size <=> b.size }.reverse.each do |key| -%>
+ ScriptAlias <%= key %> <%= script_aliases[key] %>
+<%- end -%>
FcgidMinProcessesPerClass <%= process %>
FcgidIdleTimeout 30