1 |
define apache::vhost::django_app ($module = false, |
2 |
$module_path = false, |
3 |
$use_ssl = false, |
4 |
$aliases= {}) { |
5 |
include apache::mod::wsgi |
6 |
apache::vhost::base { $name: |
7 |
use_ssl => $use_ssl, |
8 |
content => template('apache/vhost_django_app.conf'), |
9 |
aliases => $aliases, |
10 |
} |
11 |
|
12 |
# module is a ruby reserved keyword, cannot be used in templates |
13 |
$django_module = $module |
14 |
file { "$name.wsgi": |
15 |
path => "/usr/local/lib/wsgi/$name.wsgi", |
16 |
mode => '0755', |
17 |
notify => Service['apache'], |
18 |
content => template('apache/django.wsgi'), |
19 |
} |
20 |
} |
21 |
|
22 |
|