From 39e3ca75f9f7dc4e0b255eafeee89cbde00e94d6 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Tue, 1 Feb 2011 12:44:59 +0000 Subject: use vhost_base for vhost_wsgi type ( leaner ) --- modules/apache/manifests/init.pp | 9 ++------- modules/apache/templates/vhost_wsgi.conf | 14 +------------- 2 files changed, 3 insertions(+), 20 deletions(-) (limited to 'modules/apache') diff --git a/modules/apache/manifests/init.pp b/modules/apache/manifests/init.pp index 5255c072..a23b6a56 100644 --- a/modules/apache/manifests/init.pp +++ b/modules/apache/manifests/init.pp @@ -175,13 +175,8 @@ class apache { define vhost_wsgi($wsgi_path, $aliases = {}) { 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'], + vhost_base { $name: + aliases => $aliases, content => template("apache/vhost_wsgi.conf") } } diff --git a/modules/apache/templates/vhost_wsgi.conf b/modules/apache/templates/vhost_wsgi.conf index c4973cd7..34926411 100644 --- a/modules/apache/templates/vhost_wsgi.conf +++ b/modules/apache/templates/vhost_wsgi.conf @@ -1,15 +1,3 @@ - - ServerName <%= name %> - # Serve static content directly - DocumentRoot /dev/null +WSGIScriptAlias / <%= wsgi_path %> - WSGIScriptAlias / <%= wsgi_path %> - -<%- aliases.each_pair do |key,value| -%> - Alias <%= key %> <%= value %> -<%- end -%> - - Allow from all - - -- cgit v1.2.1