diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/apache/manifests/init.pp | 9 | ||||
-rw-r--r-- | modules/apache/templates/vhost_wsgi.conf | 14 |
2 files changed, 3 insertions, 20 deletions
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 @@ -<VirtualHost *:80> - 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 -%> - <Location /> - Allow from all - </Location> -</VirtualHost> |