Improved apache virtual host configuration
Additional configuration files are now fetched from the puppet file server.
This commit is contained in:
parent
eca8e074e5
commit
63440a18d4
5 changed files with 76 additions and 49 deletions
|
@ -104,8 +104,6 @@ class apache::server inherits apache::common {
|
|||
# Optional ServerAlias for this virtual host.
|
||||
# $root:
|
||||
# Path to document root. Defaults to /srv/www/http/$fqdn
|
||||
# $config:
|
||||
# Path to custom configuration file. Defaults to a basic template.
|
||||
# $redirect:
|
||||
# Add redirect to given URL.
|
||||
#
|
||||
|
@ -116,17 +114,15 @@ class apache::server inherits apache::common {
|
|||
# }
|
||||
# apache::site { "www.example.com":
|
||||
# root => "/roles/prteam/public/public_access",
|
||||
# config => "puppet:///path/to/www.example.com.conf",
|
||||
# }
|
||||
#
|
||||
define apache::site($aliases="", $root="", $config="", $redirect="") {
|
||||
define apache::site($aliases="", $root="", $redirect="") {
|
||||
|
||||
case $operatingsystem {
|
||||
debian,ubuntu: {
|
||||
apache::debian::site { "${name}":
|
||||
aliases => $aliases,
|
||||
root => $root,
|
||||
config => $config,
|
||||
redirect => $redirect,
|
||||
}
|
||||
}
|
||||
|
@ -134,7 +130,6 @@ define apache::site($aliases="", $root="", $config="", $redirect="") {
|
|||
apache::redhat::site { "${name}":
|
||||
aliases => $aliases,
|
||||
root => $root,
|
||||
config => $config,
|
||||
redirect => $redirect,
|
||||
}
|
||||
}
|
||||
|
@ -191,8 +186,6 @@ class apache::sslserver inherits apache::common {
|
|||
# FQDN of virtual host.
|
||||
# $root:
|
||||
# Path to document root. Defaults to /srv/www/https/$fqdn
|
||||
# $config:
|
||||
# Path to custom configuration file. Defaults to a basic template.
|
||||
# $ssl_cert:
|
||||
# Path to SSL certificate. Defaults to puppet client certificate.
|
||||
# $ssl_key:
|
||||
|
@ -204,19 +197,17 @@ class apache::sslserver inherits apache::common {
|
|||
#
|
||||
# apache::site { "www.example.com":
|
||||
# root => "/roles/prteam/public/secure_access",
|
||||
# config => "puppet:///path/to/www.example.com.conf",
|
||||
# ssl_cert => "puppet:///path/to/www.example.com.crt",
|
||||
# ssl_key => "puppet:///path/to/www.example.com.key",
|
||||
# }
|
||||
#
|
||||
define apache::sslsite($root="", $config="", $ssl_cert="", $ssl_key="", $ssl_chain="") {
|
||||
define apache::sslsite($root="", $ssl_cert="", $ssl_key="", $ssl_chain="") {
|
||||
|
||||
case $operatingsystem {
|
||||
debian,ubuntu: {
|
||||
$apache_ssldir = "/etc/ssl"
|
||||
apache::debian::sslsite { "${name}":
|
||||
root => $root,
|
||||
config => $config,
|
||||
ssl_cert => $ssl_cert,
|
||||
ssl_key => $ssl_key,
|
||||
ssl_chain => $ssl_chain,
|
||||
|
@ -226,7 +217,6 @@ define apache::sslsite($root="", $config="", $ssl_cert="", $ssl_key="", $ssl_cha
|
|||
$apache_ssldir = "/etc/pki/tls"
|
||||
apache::redhat::sslsite { "${name}":
|
||||
root => $root,
|
||||
config => $config,
|
||||
ssl_cert => $ssl_cert,
|
||||
ssl_key => $ssl_key,
|
||||
ssl_chain => $ssl_chain,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue