Replaced fqdn variables with homename
This commit is contained in:
parent
c871e91a13
commit
45b597c29c
12 changed files with 39 additions and 39 deletions
|
@ -8,9 +8,9 @@ class apache::debian::common {
|
|||
}
|
||||
|
||||
file { [ "/srv/www/http",
|
||||
"/srv/www/http/${fqdn}",
|
||||
"/srv/www/http/${homename}",
|
||||
"/srv/www/log/http",
|
||||
"/srv/www/log/http/${fqdn}",
|
||||
"/srv/www/log/http/${homename}",
|
||||
"/etc/apache2/conf.d",
|
||||
"/etc/apache2/sites-enabled", ]:
|
||||
ensure => directory,
|
||||
|
@ -91,7 +91,7 @@ class apache::debian::server inherits apache::debian::common {
|
|||
define apache::debian::site($aliases, $root, $redirect) {
|
||||
|
||||
if $name == "default" {
|
||||
$site_fqdn = $fqdn
|
||||
$site_fqdn = $homename
|
||||
$site_conf = "/etc/apache2/sites-enabled/00-${site_fqdn}.conf"
|
||||
$site_confdir = "/etc/apache2/sites-enabled/00-${site_fqdn}.d"
|
||||
} else {
|
||||
|
@ -164,9 +164,9 @@ define apache::debian::site($aliases, $root, $redirect) {
|
|||
class apache::debian::sslserver inherits apache::debian::common {
|
||||
|
||||
file { [ "/srv/www/https",
|
||||
"/srv/www/https/${fqdn}",
|
||||
"/srv/www/https/${homename}",
|
||||
"/srv/www/log/https",
|
||||
"/srv/www/log/https/${fqdn}", ]:
|
||||
"/srv/www/log/https/${homename}", ]:
|
||||
ensure => directory,
|
||||
mode => 0644,
|
||||
owner => root,
|
||||
|
@ -183,7 +183,7 @@ class apache::debian::sslserver inherits apache::debian::common {
|
|||
define apache::debian::sslsite($root, $ssl_cert, $ssl_key, $ssl_chain) {
|
||||
|
||||
if $name == "default" {
|
||||
$site_fqdn = $fqdn
|
||||
$site_fqdn = $homename
|
||||
} else {
|
||||
$site_fqdn = $name
|
||||
|
||||
|
@ -215,7 +215,7 @@ define apache::debian::sslsite($root, $ssl_cert, $ssl_key, $ssl_chain) {
|
|||
if $ssl_cert {
|
||||
$real_ssl_cert = $ssl_cert
|
||||
} else {
|
||||
$real_ssl_cert = "${puppet_ssldir}/certs/${fqdn}.pem"
|
||||
$real_ssl_cert = "${puppet_ssldir}/certs/${homename}.pem"
|
||||
}
|
||||
|
||||
file { "/etc/ssl/certs/${site_fqdn}.crt":
|
||||
|
@ -230,7 +230,7 @@ define apache::debian::sslsite($root, $ssl_cert, $ssl_key, $ssl_chain) {
|
|||
if $ssl_key {
|
||||
$real_ssl_key = $ssl_key
|
||||
} else {
|
||||
$real_ssl_key = "${puppet_ssldir}/private_keys/${fqdn}.pem"
|
||||
$real_ssl_key = "${puppet_ssldir}/private_keys/${homename}.pem"
|
||||
}
|
||||
|
||||
file { "/etc/ssl/private/${site_fqdn}.key":
|
||||
|
|
|
@ -140,7 +140,7 @@ define apache::site($aliases="", $root="", $redirect="") {
|
|||
|
||||
if !$redirect {
|
||||
$site_fqdn = $name ? {
|
||||
"default" => "${fqdn}",
|
||||
"default" => "${homename}",
|
||||
default => "${name}",
|
||||
}
|
||||
apache::webalizer::site { "http/${site_fqdn}":
|
||||
|
@ -228,7 +228,7 @@ define apache::sslsite($root="", $ssl_cert="", $ssl_key="", $ssl_chain="") {
|
|||
}
|
||||
|
||||
$site_fqdn = $name ? {
|
||||
"default" => "${fqdn}",
|
||||
"default" => "${homename}",
|
||||
default => "${name}",
|
||||
}
|
||||
apache::webalizer::site { "https/${site_fqdn}":
|
||||
|
|
|
@ -10,9 +10,9 @@ class apache::redhat::server {
|
|||
file { [ "/etc/httpd/conf.http.d",
|
||||
"/etc/httpd/site.http.d",
|
||||
"/srv/www/http",
|
||||
"/srv/www/http/${fqdn}",
|
||||
"/srv/www/http/${homename}",
|
||||
"/srv/www/log/http",
|
||||
"/srv/www/log/http/${fqdn}", ]:
|
||||
"/srv/www/log/http/${homename}", ]:
|
||||
ensure => directory,
|
||||
mode => 0644,
|
||||
owner => root,
|
||||
|
@ -51,7 +51,7 @@ class apache::redhat::server {
|
|||
define apache::redhat::site($aliases, $root, $redirect) {
|
||||
|
||||
if $name == "default" {
|
||||
$site_fqdn = $fqdn
|
||||
$site_fqdn = $homename
|
||||
$site_conf = "/etc/httpd/site.http.d/00-${site_fqdn}.conf"
|
||||
$site_confdir = "/etc/httpd/site.http.d/00-${site_fqdn}.d"
|
||||
} else {
|
||||
|
@ -136,9 +136,9 @@ class apache::redhat::sslserver {
|
|||
file { [ "/etc/httpd/conf.https.d",
|
||||
"/etc/httpd/site.https.d",
|
||||
"/srv/www/https",
|
||||
"/srv/www/https/${fqdn}",
|
||||
"/srv/www/https/${homename}",
|
||||
"/srv/www/log/https",
|
||||
"/srv/www/log/https/${fqdn}", ]:
|
||||
"/srv/www/log/https/${homename}", ]:
|
||||
ensure => directory,
|
||||
mode => 0644,
|
||||
owner => root,
|
||||
|
@ -198,7 +198,7 @@ class apache::redhat::sslserver {
|
|||
define apache::redhat::sslsite($root, $ssl_cert, $ssl_key, $ssl_chain) {
|
||||
|
||||
if $name == "default" {
|
||||
$site_fqdn = $fqdn
|
||||
$site_fqdn = $homename
|
||||
} else {
|
||||
$site_fqdn = $name
|
||||
|
||||
|
@ -230,7 +230,7 @@ define apache::redhat::sslsite($root, $ssl_cert, $ssl_key, $ssl_chain) {
|
|||
if $ssl_cert {
|
||||
$real_ssl_cert = $ssl_cert
|
||||
} else {
|
||||
$real_ssl_cert = "${puppet_ssldir}/certs/${fqdn}.pem"
|
||||
$real_ssl_cert = "${puppet_ssldir}/certs/${homename}.pem"
|
||||
}
|
||||
|
||||
file { "/etc/pki/tls/certs/${site_fqdn}.crt":
|
||||
|
@ -245,7 +245,7 @@ define apache::redhat::sslsite($root, $ssl_cert, $ssl_key, $ssl_chain) {
|
|||
if $ssl_key {
|
||||
$real_ssl_key = $ssl_key
|
||||
} else {
|
||||
$real_ssl_key = "${puppet_ssldir}/private_keys/${fqdn}.pem"
|
||||
$real_ssl_key = "${puppet_ssldir}/private_keys/${homename}.pem"
|
||||
}
|
||||
|
||||
file { "/etc/pki/tls/private/${site_fqdn}.key":
|
||||
|
|
|
@ -191,7 +191,7 @@ HostnameLookups Off
|
|||
# logged here. If you *do* define an error logfile for a <VirtualHost>
|
||||
# container, that host's errors will be logged there and not here.
|
||||
#
|
||||
ErrorLog /srv/www/log/http/<%= fqdn %>/error_log
|
||||
ErrorLog /srv/www/log/http/<%= homename %>/error_log
|
||||
|
||||
#
|
||||
# LogLevel: Control the number of messages logged to the error_log.
|
||||
|
@ -223,7 +223,7 @@ LogFormat "%{User-agent}i" agent
|
|||
|
||||
#
|
||||
# Define an access log for VirtualHosts that don't define their own logfile
|
||||
CustomLog /srv/www/log/http/<%= fqdn %>/access_log combined
|
||||
CustomLog /srv/www/log/http/<%= homename %>/access_log combined
|
||||
|
||||
|
||||
# Include of directories ignores editors' and dpkg's backup files,
|
||||
|
|
|
@ -17,7 +17,7 @@ ServerAdmin adm@<%= domain %>
|
|||
# You will have to access it by its address anyway, and this will make
|
||||
# redirections work in a sensible way.
|
||||
#
|
||||
ServerName <%= fqdn %>
|
||||
ServerName <%= homename %>
|
||||
|
||||
#
|
||||
# UseCanonicalName: Determines how Apache constructs self-referencing
|
||||
|
|
|
@ -265,7 +265,7 @@ ServerAdmin adm@<%= domain %>
|
|||
# redirections work in a sensible way.
|
||||
#
|
||||
#ServerName www.example.com:80
|
||||
ServerName <%= fqdn %>
|
||||
ServerName <%= homename %>
|
||||
|
||||
#
|
||||
# UseCanonicalName: Determines how Apache constructs self-referencing
|
||||
|
@ -281,7 +281,7 @@ UseCanonicalName Off
|
|||
# documents. By default, all requests are taken from this directory, but
|
||||
# symbolic links and aliases may be used to point to other locations.
|
||||
#
|
||||
DocumentRoot "/srv/www/http/<%= fqdn %>"
|
||||
DocumentRoot "/srv/www/http/<%= homename %>"
|
||||
|
||||
#
|
||||
# Each directory to which Apache has access can be configured with respect
|
||||
|
@ -474,7 +474,7 @@ HostnameLookups Off
|
|||
# logged here. If you *do* define an error logfile for a <VirtualHost>
|
||||
# container, that host's errors will be logged there and not here.
|
||||
#
|
||||
ErrorLog /srv/www/log/http/<%= fqdn %>/error_log
|
||||
ErrorLog /srv/www/log/http/<%= homename %>/error_log
|
||||
|
||||
#
|
||||
# LogLevel: Control the number of messages logged to the error_log.
|
||||
|
@ -516,7 +516,7 @@ LogFormat "%{User-agent}i" agent
|
|||
# For a single logfile with access, agent, and referer information
|
||||
# (Combined Logfile Format), use the following directive:
|
||||
#
|
||||
CustomLog /srv/www/log/http/<%= fqdn %>/access_log combined
|
||||
CustomLog /srv/www/log/http/<%= homename %>/access_log combined
|
||||
|
||||
#
|
||||
# Optionally add a line containing the server version and virtual host
|
||||
|
|
|
@ -265,7 +265,7 @@ ServerAdmin adm@<%= domain %>
|
|||
# redirections work in a sensible way.
|
||||
#
|
||||
#ServerName www.example.com:80
|
||||
ServerName <%= fqdn %>
|
||||
ServerName <%= homename %>
|
||||
|
||||
#
|
||||
# UseCanonicalName: Determines how Apache constructs self-referencing
|
||||
|
@ -281,7 +281,7 @@ UseCanonicalName Off
|
|||
# documents. By default, all requests are taken from this directory, but
|
||||
# symbolic links and aliases may be used to point to other locations.
|
||||
#
|
||||
DocumentRoot "/srv/www/https/<%= fqdn %>"
|
||||
DocumentRoot "/srv/www/https/<%= homename %>"
|
||||
|
||||
#
|
||||
# Each directory to which Apache has access can be configured with respect
|
||||
|
@ -474,7 +474,7 @@ HostnameLookups Off
|
|||
# logged here. If you *do* define an error logfile for a <VirtualHost>
|
||||
# container, that host's errors will be logged there and not here.
|
||||
#
|
||||
ErrorLog /srv/www/log/https/<%= fqdn %>/error_log
|
||||
ErrorLog /srv/www/log/https/<%= homename %>/error_log
|
||||
|
||||
#
|
||||
# LogLevel: Control the number of messages logged to the error_log.
|
||||
|
@ -516,7 +516,7 @@ LogFormat "%{User-agent}i" agent
|
|||
# For a single logfile with access, agent, and referer information
|
||||
# (Combined Logfile Format), use the following directive:
|
||||
#
|
||||
CustomLog /srv/www/log/https/<%= fqdn %>/access_log combined
|
||||
CustomLog /srv/www/log/https/<%= homename %>/access_log combined
|
||||
|
||||
#
|
||||
# Optionally add a line containing the server version and virtual host
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue