diff options
author | Michael Scherer <misc@mageia.org> | 2011-01-24 12:22:10 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2011-01-24 12:22:10 +0000 |
commit | 88a56021c56263466c7ea0385cc3b48ce62fb86a (patch) | |
tree | 228d0bd9ecf3e3086fed13a40c0e7092ec8689d9 /modules | |
parent | 99eb3cb284f0d0665719da14a371bce04c02aa60 (diff) | |
download | puppet-88a56021c56263466c7ea0385cc3b48ce62fb86a.tar puppet-88a56021c56263466c7ea0385cc3b48ce62fb86a.tar.gz puppet-88a56021c56263466c7ea0385cc3b48ce62fb86a.tar.bz2 puppet-88a56021c56263466c7ea0385cc3b48ce62fb86a.tar.xz puppet-88a56021c56263466c7ea0385cc3b48ce62fb86a.zip |
allow to set aliases for wsgi powered web application ( should be refactored, IMHO )
Diffstat (limited to 'modules')
-rw-r--r-- | modules/apache/manifests/init.pp | 2 | ||||
-rw-r--r-- | modules/apache/templates/vhost_wsgi.conf | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/modules/apache/manifests/init.pp b/modules/apache/manifests/init.pp index e21febcf..bcad0d24 100644 --- a/modules/apache/manifests/init.pp +++ b/modules/apache/manifests/init.pp @@ -157,7 +157,7 @@ class apache { } } - define vhost_wsgi($wsgi_path) { + define vhost_wsgi($wsgi_path, $aliases = false) { include apache::mod_wsgi file { "$name.conf": path => "/etc/httpd/conf/vhosts.d/$name.conf", diff --git a/modules/apache/templates/vhost_wsgi.conf b/modules/apache/templates/vhost_wsgi.conf index 5c30d337..c4973cd7 100644 --- a/modules/apache/templates/vhost_wsgi.conf +++ b/modules/apache/templates/vhost_wsgi.conf @@ -4,6 +4,10 @@ DocumentRoot /dev/null WSGIScriptAlias / <%= wsgi_path %> + +<%- aliases.each_pair do |key,value| -%> + Alias <%= key %> <%= value %> +<%- end -%> <Location /> Allow from all </Location> |