1 |
class websites { |
2 |
class base { |
3 |
$webdatadir = '/var/www/vhosts' |
4 |
} |
5 |
|
6 |
# vhost to host static files used by web sites |
7 |
class static inherits base { |
8 |
$vhostdir = "$webdatadir/static.$domain" |
9 |
$svn_location = "svn://svn.$domain/svn/web/www/trunk/g/" |
10 |
apache::vhost_other_app { "static.$domain": |
11 |
vhost_file => 'websites/vhost_static.conf', |
12 |
} |
13 |
|
14 |
file { $vhostdir: |
15 |
ensure => directory, |
16 |
mode => 655, |
17 |
} |
18 |
|
19 |
subversion::snapshot { "$vhostdir/g": |
20 |
source => $svn_location |
21 |
} |
22 |
} |
23 |
|
24 |
class hugs inherits base { |
25 |
$vhostdir = "$webdatadir/hugs.$domain" |
26 |
$svn_location = "svn://svn.$domain/svn/web/hugs/public/" |
27 |
apache::vhost_base { "hugs.$domain": |
28 |
location => $vhostdir, |
29 |
} |
30 |
|
31 |
subversion::snapshot { "$vhostdir": |
32 |
source => $svn_location |
33 |
} |
34 |
|
35 |
package { php-exif: |
36 |
ensure => "installed", |
37 |
} |
38 |
} |
39 |
|
40 |
class releases inherits base { |
41 |
$vhostdir = "$webdatadir/releases.$domain" |
42 |
$svn_location = "svn://svn.$domain/svn/web/releases/" |
43 |
apache::vhost_base { "releases.$domain": |
44 |
location => $vhostdir, |
45 |
options => [ "FollowSymLinks" ] |
46 |
} |
47 |
apache::vhost_base { "ssl_releases.$domain": |
48 |
vhost => "releases.$domain", |
49 |
use_ssl => true, |
50 |
location => $vhostdir, |
51 |
options => [ "FollowSymLinks" ] |
52 |
} |
53 |
|
54 |
subversion::snapshot { "$vhostdir": |
55 |
source => $svn_location |
56 |
} |
57 |
} |
58 |
|
59 |
class svn { |
60 |
apache::vhost_redirect { "svn.$domain": |
61 |
url => "http://svnweb.$domain/", |
62 |
} |
63 |
} |
64 |
|
65 |
class forum_proxy { |
66 |
|
67 |
$web_domain = "forums.$domain" |
68 |
host { "$web_domain": |
69 |
ip => '192.168.122.131', |
70 |
ensure => 'present', |
71 |
} |
72 |
|
73 |
apache::vhost_reverse_proxy { "$web_domain": |
74 |
url => "http://$web_domain/", |
75 |
} |
76 |
|
77 |
apache::vhost_reverse_proxy { "ssl_$web_domain": |
78 |
vhost => $web_domain, |
79 |
use_ssl => true, |
80 |
url => "http://$web_domain/", |
81 |
} |
82 |
} |
83 |
} |