9 |
} |
} |
10 |
} |
} |
11 |
|
|
|
define vhost_django_app($module = false, $module_path = false, $use_ssl = false, $aliases= {}) { |
|
|
include apache::mod::wsgi |
|
|
apache::vhost::base { $name: |
|
|
use_ssl => $use_ssl, |
|
|
content => template("apache/vhost_django_app.conf"), |
|
|
aliases => $aliases, |
|
|
} |
|
|
|
|
|
# module is a ruby reserved keyword, cannot be used in templates |
|
|
$django_module = $module |
|
|
file { "$name.wsgi": |
|
|
path => "/usr/local/lib/wsgi/$name.wsgi", |
|
|
mode => 755, |
|
|
notify => Service['apache'], |
|
|
content => template("apache/django.wsgi"), |
|
|
} |
|
|
} |
|
|
|
|
|
define vhost_other_app($vhost_file) { |
|
|
include apache::base |
|
|
apache::config { "/etc/httpd/conf/vhosts.d/$name.conf": |
|
|
content => template($vhost_file), |
|
|
} |
|
|
} |
|
|
|
|
12 |
define vhost_simple($location) { |
define vhost_simple($location) { |
13 |
include apache::base |
include apache::base |
14 |
apache::vhost::base { $name: |
apache::vhost::base { $name: |