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