aboutsummaryrefslogtreecommitdiffstats
path: root/modules/apache
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-05-24 09:07:42 +0000
committerNicolas Vigier <boklm@mageia.org>2011-05-24 09:07:42 +0000
commitf2489b8885820c74273ef5fc0593bc1ab022b4a9 (patch)
treef93404de771bd74c0639b1fe6e2376fb6fbe451a /modules/apache
parent21da02c7d27e32815d3c4e52654b2738a6625fc2 (diff)
downloadpuppet-f2489b8885820c74273ef5fc0593bc1ab022b4a9.tar
puppet-f2489b8885820c74273ef5fc0593bc1ab022b4a9.tar.gz
puppet-f2489b8885820c74273ef5fc0593bc1ab022b4a9.tar.bz2
puppet-f2489b8885820c74273ef5fc0593bc1ab022b4a9.tar.xz
puppet-f2489b8885820c74273ef5fc0593bc1ab022b4a9.zip
add separate logs on vhost_base
Diffstat (limited to 'modules/apache')
-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