aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/apache/manifests/init.pp10
-rw-r--r--modules/apache/templates/vhost_base.conf3
2 files changed, 13 insertions, 0 deletions
diff --git a/modules/apache/manifests/init.pp b/modules/apache/manifests/init.pp
index ead7d8f1..08f294c3 100644
--- a/modules/apache/manifests/init.pp
+++ b/modules/apache/manifests/init.pp
@@ -2,6 +2,7 @@ class apache {
class base {
$php_date_timezone = "UTC"
+ $httpd_logdir = "/var/log/httpd"
package { "apache-mpm-prefork":
alias => apache,
@@ -145,6 +146,8 @@ class apache {
$vhost = false,
$aliases = {},
$server_aliases = [],
+ $access_logfile = false,
+ $error_logfile = false,
$options = [],
$enable_public_html = false) {
include apache::base
@@ -154,6 +157,13 @@ class apache {
$real_vhost = $vhost
}
+ if ! $access_logfile {
+ $access_logfile = $httpd_logdir/access_log-$real_vhost
+ }
+ if ! $error_logfile {
+ $error_logfile = $httpd_logdir/error_log-$real_vhost
+ }
+
if $use_ssl {
include apache::mod_ssl
if $wildcard_sslcert != 'true' {
diff --git a/modules/apache/templates/vhost_base.conf b/modules/apache/templates/vhost_base.conf
index e737e990..6737ad00 100644
--- a/modules/apache/templates/vhost_base.conf
+++ b/modules/apache/templates/vhost_base.conf
@@ -24,6 +24,9 @@ end
<%- end -%>
DocumentRoot <%= location %>
+ CustomLog <%= access_logfile %> combined
+ ErrorLog <%= error_logfile %>
+
<%- if enable_public_html -%>
#TODO add the rest
UserDir public_html