Modified: puppet/modules/apache/manifests/init.pp
===================================================================
--- puppet/modules/apache/manifests/init.pp 2011-01-16 13:59:51 UTC (rev 811)
+++ puppet/modules/apache/manifests/init.pp 2011-01-17 15:24:07 UTC (rev 812)
@@ -157,6 +157,19 @@
}
}
+ define vhost_wsgi($wsgi_path) {
+ include apache::mod_wsgi
+ 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_wsgi.conf")
+ }
+ }
+
define vhost_other_app($vhost_file) {
include apache::base
file { "$name.conf":
Added: puppet/modules/apache/templates/vhost_wsgi.conf
===================================================================
--- puppet/modules/apache/templates/vhost_wsgi.conf (rev 0)
+++ puppet/modules/apache/templates/vhost_wsgi.conf 2011-01-17 15:24:07 UTC (rev 812)
@@ -0,0 +1,11 @@
+<VirtualHost *:80>
+ ServerName <%= name %>
+ # Serve static content directly
+ DocumentRoot /dev/null
+
+ WSGIScriptAlias / <%= wsgi_path %>
+ <Location />
+ Allow from all
+ </Location>
+</VirtualHost>
+