28
|
1 |
## SSL-enabled vhosts |
|
2 |
# SSL-enabled vhosts respond only to HTTPS queries. |
|
3 |
|
|
4 |
# Base class. Turn off the default vhosts; we will be declaring |
|
5 |
# all vhosts below. |
|
6 |
class { 'apache': |
|
7 |
default_vhost => false, |
|
8 |
} |
|
9 |
|
|
10 |
# Non-ssl vhost |
|
11 |
apache::vhost { 'first.example.com non-ssl': |
|
12 |
servername => 'first.example.com', |
|
13 |
port => '80', |
|
14 |
docroot => '/var/www/first', |
|
15 |
} |
|
16 |
|
|
17 |
# SSL vhost at the same domain |
|
18 |
apache::vhost { 'first.example.com ssl': |
|
19 |
servername => 'first.example.com', |
|
20 |
port => '443', |
|
21 |
docroot => '/var/www/first', |
|
22 |
ssl => true, |
|
23 |
} |