/[adm]/puppet/modules/apache/manifests/init.pp
ViewVC logotype

Contents of /puppet/modules/apache/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2692 - (show annotations) (download)
Sun Mar 25 12:47:29 2012 UTC (12 years ago) by misc
File size: 2030 byte(s)
split vhost_wsgi in a separate file
1 class apache {
2 define vhost_catalyst_app($script, $location = '', $process = 4, $use_ssl = false, $vhost = false) {
3
4 include apache::mod::fastcgi
5 apache::vhost::base { $name:
6 vhost => $vhost,
7 use_ssl => $use_ssl,
8 content => template("apache/vhost_catalyst_app.conf"),
9 }
10 }
11
12 define vhost_django_app($module = false, $module_path = false, $use_ssl = false, $aliases= {}) {
13 include apache::mod::wsgi
14 apache::vhost::base { $name:
15 use_ssl => $use_ssl,
16 content => template("apache/vhost_django_app.conf"),
17 aliases => $aliases,
18 }
19
20 # module is a ruby reserved keyword, cannot be used in templates
21 $django_module = $module
22 file { "$name.wsgi":
23 path => "/usr/local/lib/wsgi/$name.wsgi",
24 mode => 755,
25 notify => Service['apache'],
26 content => template("apache/django.wsgi"),
27 }
28 }
29
30 define vhost_other_app($vhost_file) {
31 include apache::base
32 apache::config { "/etc/httpd/conf/vhosts.d/$name.conf":
33 content => template($vhost_file),
34 }
35 }
36
37 define vhost_simple($location) {
38 include apache::base
39 apache::vhost::base { $name:
40 location => $location,
41 }
42 }
43
44 define vhost_redirect($url,
45 $vhost = false,
46 $use_ssl = false) {
47 include apache::base
48 apache::vhost::base { $name:
49 use_ssl => $use_ssl,
50 vhost => $vhost,
51 content => template("apache/vhost_redirect.conf"),
52 }
53 }
54
55 define vhost_reverse_proxy($url,
56 $vhost = false,
57 $use_ssl = false) {
58 include apache::mod::proxy
59 apache::vhost::base { $name:
60 use_ssl => $use_ssl,
61 vhost => $vhost,
62 content => template("apache/vhost_reverse_proxy.conf")
63 }
64 }
65
66 }

  ViewVC Help
Powered by ViewVC 1.1.30