1 |
misc |
2226 |
class websites { |
2 |
misc |
2203 |
class www inherits base { |
3 |
|
|
$vhost = "www.$domain" |
4 |
|
|
$vhostdir = "$webdatadir/www.$domain" |
5 |
|
|
$svn_location = "svn://svn.$domain/svn/web/www/trunk" |
6 |
|
|
|
7 |
|
|
include apache::mod_php |
8 |
|
|
include apache::mod_geoip |
9 |
|
|
|
10 |
misc |
2249 |
# for mailman reverse proxy, on ssl |
11 |
|
|
include apache::mod_proxy |
12 |
|
|
include apache::mod_ssl |
13 |
|
|
|
14 |
misc |
2203 |
subversion::snapshot { $vhostdir: |
15 |
|
|
source => $svn_location, |
16 |
|
|
} |
17 |
|
|
|
18 |
|
|
file { "$vhostdir/var/tmp/cache": |
19 |
|
|
ensure => directory, |
20 |
|
|
owner => root, |
21 |
|
|
group => $apache::base::apache_group, |
22 |
|
|
mode => 0660, |
23 |
|
|
} |
24 |
|
|
|
25 |
|
|
apache::vhost_base { "$vhost": |
26 |
misc |
2247 |
content => template('websites/vhost_www.conf', "websites/vhost_proxy_mailman.conf"), |
27 |
misc |
2203 |
location => $vhostdir, |
28 |
|
|
options => ['FollowSymLinks'], |
29 |
|
|
} |
30 |
|
|
|
31 |
|
|
apache::vhost_base { "ssl_$vhost": |
32 |
|
|
use_ssl => true, |
33 |
|
|
vhost => $vhost, |
34 |
misc |
2247 |
content => template('websites/vhost_www.conf', "websites/vhost_proxy_mailman_ssl.conf"), |
35 |
misc |
2203 |
location => $vhostdir, |
36 |
|
|
options => ['FollowSymLinks'], |
37 |
|
|
} |
38 |
|
|
|
39 |
|
|
apache::vhost_redirect { $domain: |
40 |
|
|
url => 'http://www.mageia.org/', |
41 |
|
|
} |
42 |
|
|
|
43 |
|
|
apache::vhost_redirect { "ssl_$domain": |
44 |
|
|
use_ssl => true, |
45 |
|
|
vhost => $domain, |
46 |
|
|
url => 'https://www.mageia.org/', |
47 |
|
|
} |
48 |
|
|
|
49 |
|
|
package { ['php-mbstring', 'php-mcrypt', 'php-gettext']: } |
50 |
|
|
} |
51 |
|
|
} |