diff options
author | Pascal Terjan <pterjan@mageia.org> | 2014-04-04 11:46:45 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2014-04-04 11:46:45 +0000 |
commit | 21af2f933a3472a44ed1a8c1082c4e68f530ec5b (patch) | |
tree | 45bf916907845ba31eb9fe4c599a9b6071e5a1df /modules | |
parent | 61706b9928c2e306cc8064cb0873b1060087495e (diff) | |
download | puppet-21af2f933a3472a44ed1a8c1082c4e68f530ec5b.tar puppet-21af2f933a3472a44ed1a8c1082c4e68f530ec5b.tar.gz puppet-21af2f933a3472a44ed1a8c1082c4e68f530ec5b.tar.bz2 puppet-21af2f933a3472a44ed1a8c1082c4e68f530ec5b.tar.xz puppet-21af2f933a3472a44ed1a8c1082c4e68f530ec5b.zip |
Attempt to support alias in catalyst_app
Diffstat (limited to 'modules')
-rw-r--r-- | modules/apache/manifests/vhost/catalyst_app.pp | 8 | ||||
-rw-r--r-- | modules/apache/templates/vhost_catalyst_app.conf | 5 | ||||
-rw-r--r-- | modules/mga-mirrors/manifests/init.pp | 3 |
3 files changed, 13 insertions, 3 deletions
diff --git a/modules/apache/manifests/vhost/catalyst_app.pp b/modules/apache/manifests/vhost/catalyst_app.pp index 54a00fb2..655dc7ba 100644 --- a/modules/apache/manifests/vhost/catalyst_app.pp +++ b/modules/apache/manifests/vhost/catalyst_app.pp @@ -2,12 +2,20 @@ define apache::vhost::catalyst_app( $script, $location = '', $process = 4, $use_ssl = false, + $aliases = {}, $vhost = false) { include apache::mod::fastcgi + if $location { + $aliases = merge($aliases, {'/static'] => "$location/root/static"}) + } + + $aliases = merge($aliases, {'/' => $script}) + apache::vhost::base { $name: vhost => $vhost, use_ssl => $use_ssl, content => template('apache/vhost_catalyst_app.conf'), + aliases => $aliases, } } diff --git a/modules/apache/templates/vhost_catalyst_app.conf b/modules/apache/templates/vhost_catalyst_app.conf index eaa652d7..13b73cc0 100644 --- a/modules/apache/templates/vhost_catalyst_app.conf +++ b/modules/apache/templates/vhost_catalyst_app.conf @@ -1,5 +1,4 @@ -<%- if location != '' then -%> -Alias /static <%= location %>/root/static +<%- aliases.keys.sort {|a,b| a.size <=> b.size }.reverse.each do |key| -%> + Alias <%= key %> <%= aliases[key] %> <%- end -%> -Alias / <%= script %>/ FastCgiServer <%= script %> -processes <%= process %> -idle-timeout 30 diff --git a/modules/mga-mirrors/manifests/init.pp b/modules/mga-mirrors/manifests/init.pp index b29c6fcb..cd1b57ef 100644 --- a/modules/mga-mirrors/manifests/init.pp +++ b/modules/mga-mirrors/manifests/init.pp @@ -7,6 +7,9 @@ class mga-mirrors { apache::vhost::catalyst_app { $vhost: script => '/usr/bin/mga_mirrors_fastcgi.pl', require => Package['mga-mirrors'], + aliases => { + '/status' => '/var/www/mirrors/status.html', + } } apache::vhost::base { "ssl_$vhost": |