1 |
misc |
80 |
class apache { |
2 |
|
|
|
3 |
|
|
class base { |
4 |
|
|
package { "apache-mpm-prefork": |
5 |
misc |
117 |
alias => apache, |
6 |
misc |
80 |
ensure => installed |
7 |
|
|
} |
8 |
|
|
|
9 |
misc |
96 |
service { httpd: |
10 |
|
|
alias => apache, |
11 |
misc |
80 |
ensure => running, |
12 |
|
|
subscribe => [ Package['apache-mpm-prefork'] ], |
13 |
|
|
} |
14 |
misc |
117 |
|
15 |
|
|
file { "customization.conf": |
16 |
|
|
ensure => present, |
17 |
misc |
126 |
path => "/etc/httpd/conf.d/customization.conf", |
18 |
misc |
117 |
content => template("apache/customization.conf"), |
19 |
|
|
require => Package["apache"], |
20 |
|
|
notify => Service["apache"], |
21 |
|
|
owner => root, |
22 |
|
|
group => root, |
23 |
|
|
mode => 644, |
24 |
|
|
} |
25 |
misc |
80 |
} |
26 |
|
|
|
27 |
|
|
class mod_php inherits base { |
28 |
|
|
package { "apache-mod_php": |
29 |
|
|
ensure => installed |
30 |
|
|
} |
31 |
|
|
} |
32 |
|
|
|
33 |
|
|
class mod_perl inherits base { |
34 |
|
|
package { "apache-mod_perl": |
35 |
|
|
ensure => installed |
36 |
|
|
} |
37 |
|
|
} |
38 |
|
|
|
39 |
misc |
84 |
class mod_fcgid inherits base { |
40 |
|
|
package { "apache-mod_fcgid": |
41 |
|
|
ensure => installed |
42 |
|
|
} |
43 |
|
|
} |
44 |
|
|
|
45 |
misc |
124 |
class mod_fastcgi inherits base { |
46 |
|
|
package { "apache-mod_fastcgi": |
47 |
|
|
ensure => installed |
48 |
|
|
} |
49 |
|
|
} |
50 |
misc |
84 |
|
51 |
misc |
80 |
class mod_wsgi inherits base { |
52 |
|
|
package { "apache-mod_wsgi": |
53 |
|
|
ensure => installed |
54 |
|
|
} |
55 |
|
|
} |
56 |
misc |
167 |
|
57 |
misc |
176 |
define vhost_redirect_ssl() { |
58 |
|
|
file { "redirect_ssl_$name.conf": |
59 |
|
|
path => "/etc/httpd/conf/vhosts.d/redirect_ssl_$name.conf", |
60 |
|
|
ensure => "present", |
61 |
|
|
owner => root, |
62 |
|
|
group => root, |
63 |
|
|
mode => 644, |
64 |
|
|
notify => Service['apache'], |
65 |
|
|
content => template("apache/vhost_ssl_redirect.conf") |
66 |
|
|
} |
67 |
|
|
} |
68 |
misc |
167 |
|
69 |
misc |
176 |
define vhost_catalyst_app($script, $process = 4, $use_ssl = false) { |
70 |
|
|
|
71 |
misc |
167 |
include apache::mod_fastcgi |
72 |
|
|
|
73 |
|
|
file { "$name.conf": |
74 |
|
|
path => "/etc/httpd/conf/vhosts.d/$name.conf", |
75 |
|
|
ensure => "present", |
76 |
|
|
owner => root, |
77 |
|
|
group => root, |
78 |
|
|
mode => 644, |
79 |
|
|
notify => Service['apache'], |
80 |
|
|
content => template("apache/vhost_catalyst_app.conf") |
81 |
|
|
} |
82 |
|
|
} |
83 |
misc |
80 |
} |