1 |
misc |
80 |
class apache { |
2 |
boklm |
1617 |
define vhost_catalyst_app($script, $location = '', $process = 4, $use_ssl = false, $vhost = false) { |
3 |
misc |
928 |
|
4 |
misc |
2684 |
include apache::mod::fastcgi |
5 |
misc |
2689 |
apache::vhost::base { $name: |
6 |
misc |
2225 |
vhost => $vhost, |
7 |
misc |
928 |
use_ssl => $use_ssl, |
8 |
misc |
2225 |
content => template("apache/vhost_catalyst_app.conf"), |
9 |
misc |
167 |
} |
10 |
|
|
} |
11 |
misc |
182 |
|
12 |
misc |
1193 |
define vhost_django_app($module = false, $module_path = false, $use_ssl = false, $aliases= {}) { |
13 |
misc |
2686 |
include apache::mod::wsgi |
14 |
misc |
2689 |
apache::vhost::base { $name: |
15 |
misc |
934 |
use_ssl => $use_ssl, |
16 |
misc |
1193 |
content => template("apache/vhost_django_app.conf"), |
17 |
|
|
aliases => $aliases, |
18 |
misc |
621 |
} |
19 |
misc |
928 |
|
20 |
misc |
612 |
# module is a ruby reserved keyword, cannot be used in templates |
21 |
|
|
$django_module = $module |
22 |
misc |
182 |
file { "$name.wsgi": |
23 |
misc |
201 |
path => "/usr/local/lib/wsgi/$name.wsgi", |
24 |
misc |
182 |
mode => 755, |
25 |
|
|
notify => Service['apache'], |
26 |
misc |
2225 |
content => template("apache/django.wsgi"), |
27 |
misc |
182 |
} |
28 |
|
|
} |
29 |
boklm |
280 |
|
30 |
|
|
define vhost_other_app($vhost_file) { |
31 |
misc |
412 |
include apache::base |
32 |
misc |
2225 |
apache::config { "/etc/httpd/conf/vhosts.d/$name.conf": |
33 |
|
|
content => template($vhost_file), |
34 |
boklm |
280 |
} |
35 |
|
|
} |
36 |
|
|
|
37 |
misc |
742 |
define vhost_simple($location) { |
38 |
|
|
include apache::base |
39 |
misc |
2689 |
apache::vhost::base { $name: |
40 |
misc |
928 |
location => $location, |
41 |
|
|
} |
42 |
misc |
742 |
} |
43 |
|
|
|
44 |
boklm |
1319 |
define vhost_redirect($url, |
45 |
misc |
2225 |
$vhost = false, |
46 |
|
|
$use_ssl = false) { |
47 |
misc |
931 |
include apache::base |
48 |
misc |
2689 |
apache::vhost::base { $name: |
49 |
boklm |
1319 |
use_ssl => $use_ssl, |
50 |
|
|
vhost => $vhost, |
51 |
misc |
931 |
content => template("apache/vhost_redirect.conf"), |
52 |
|
|
} |
53 |
|
|
} |
54 |
|
|
|
55 |
misc |
1103 |
define vhost_reverse_proxy($url, |
56 |
|
|
$vhost = false, |
57 |
|
|
$use_ssl = false) { |
58 |
misc |
2682 |
include apache::mod::proxy |
59 |
misc |
2689 |
apache::vhost::base { $name: |
60 |
misc |
1102 |
use_ssl => $use_ssl, |
61 |
misc |
1103 |
vhost => $vhost, |
62 |
misc |
778 |
content => template("apache/vhost_reverse_proxy.conf") |
63 |
misc |
928 |
} |
64 |
misc |
778 |
} |
65 |
|
|
|
66 |
misc |
80 |
} |