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 |
boklm |
2916 |
include apache::var |
8 |
misc |
2685 |
include apache::mod::php |
9 |
misc |
2203 |
|
10 |
misc |
2578 |
# for mailman reverse proxy, on ssl |
11 |
misc |
2682 |
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 |
boklm |
2916 |
group => $apache::var::apache_group, |
21 |
misc |
2578 |
mode => '0660', |
22 |
|
|
} |
23 |
misc |
2203 |
|
24 |
misc |
2691 |
apache::vhost::base { $vhost: |
25 |
boklm |
2718 |
content => template('websites/vhost_www.conf', |
26 |
boklm |
3047 |
'websites/vhost_www_rewrite.conf'), |
27 |
misc |
2578 |
location => $vhostdir, |
28 |
|
|
options => ['FollowSymLinks'], |
29 |
|
|
} |
30 |
misc |
2203 |
|
31 |
misc |
2691 |
apache::vhost::base { "ssl_$vhost": |
32 |
misc |
2578 |
use_ssl => true, |
33 |
|
|
vhost => $vhost, |
34 |
boklm |
2718 |
content => template('websites/vhost_www.conf', |
35 |
boklm |
3047 |
'websites/vhost_www_rewrite.conf'), |
36 |
misc |
2578 |
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 |
} |