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 |
|
|
subversion::snapshot { $vhostdir: |
11 |
|
|
source => $svn_location, |
12 |
|
|
} |
13 |
|
|
|
14 |
|
|
file { "$vhostdir/var/tmp/cache": |
15 |
|
|
ensure => directory, |
16 |
|
|
owner => root, |
17 |
|
|
group => $apache::base::apache_group, |
18 |
|
|
mode => 0660, |
19 |
|
|
} |
20 |
|
|
|
21 |
|
|
apache::vhost_base { "$vhost": |
22 |
|
|
content => template('websites/vhost_www.conf'), |
23 |
|
|
location => $vhostdir, |
24 |
|
|
options => ['FollowSymLinks'], |
25 |
|
|
} |
26 |
|
|
|
27 |
|
|
apache::vhost_base { "ssl_$vhost": |
28 |
|
|
use_ssl => true, |
29 |
|
|
vhost => $vhost, |
30 |
|
|
content => template('websites/vhost_www.conf'), |
31 |
|
|
location => $vhostdir, |
32 |
|
|
options => ['FollowSymLinks'], |
33 |
|
|
} |
34 |
|
|
|
35 |
|
|
apache::vhost_redirect { $domain: |
36 |
|
|
url => 'http://www.mageia.org/', |
37 |
|
|
} |
38 |
|
|
|
39 |
|
|
apache::vhost_redirect { "ssl_$domain": |
40 |
|
|
use_ssl => true, |
41 |
|
|
vhost => $domain, |
42 |
|
|
url => 'https://www.mageia.org/', |
43 |
|
|
} |
44 |
|
|
|
45 |
|
|
package { ['php-mbstring', 'php-mcrypt', 'php-gettext']: } |
46 |
|
|
} |
47 |
|
|
} |