Vhost File Declarations
Include apache::vhost file declarations and templates.
This commit is contained in:
parent
6cf7312ff3
commit
9a51b4aa8d
@ -41,12 +41,43 @@ define apache::vhost(
|
|||||||
|
|
||||||
include apache
|
include apache
|
||||||
|
|
||||||
file {"${apache::params::vdir}/${priority}-${name}":
|
if $servername == '' {
|
||||||
content => template($template),
|
$srvname = $name
|
||||||
owner => 'root',
|
} else {
|
||||||
group => 'root',
|
$srvname = $servername
|
||||||
mode => '777',
|
}
|
||||||
require => Package['httpd'],
|
|
||||||
notify => Service['httpd'],
|
if $ssl == true {
|
||||||
|
include apache::ssl
|
||||||
|
}
|
||||||
|
|
||||||
|
# Since the template will use auth, redirect to https requires mod_rewrite
|
||||||
|
if $redirect_ssl == true {
|
||||||
|
case $operatingsystem {
|
||||||
|
'debian','ubuntu': {
|
||||||
|
A2mod <| title == 'rewrite' |>
|
||||||
|
}
|
||||||
|
default: { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
file {
|
||||||
|
"${apache::params::vdir}/${priority}-${name}.conf":
|
||||||
|
content => template($template),
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '755',
|
||||||
|
require => Package['httpd'],
|
||||||
|
notify => Service['httpd'],
|
||||||
|
}
|
||||||
|
|
||||||
|
if ! defined(Firewall["0100-INPUT ACCEPT $port"]) {
|
||||||
|
@firewall {
|
||||||
|
"0100-INPUT ACCEPT $port":
|
||||||
|
jump => 'ACCEPT',
|
||||||
|
dport => "$port",
|
||||||
|
proto => 'tcp'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user