changeset 161:d2b4750e843a puppet-3.6

Add custom log format - combined plus requested domain This helps by logging which domain people hit and got redirected by without having per-domain logs
author IBBoard <dev@ibboard.co.uk>
date Sun, 02 Apr 2017 20:09:13 +0100
parents 0d829df9cd39
children db83ec9fc9c8
files modules/website/manifests/http.pp modules/website/manifests/https.pp modules/website/manifests/https/redir.pp
diffstat 3 files changed, 5 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/modules/website/manifests/http.pp	Sat Apr 01 10:54:09 2017 +0100
     1.2 +++ b/modules/website/manifests/http.pp	Sun Apr 02 20:09:13 2017 +0100
     1.3 @@ -35,6 +35,7 @@
     1.4      custom_fragment => $custom_fragment,
     1.5      logroot         => '/var/log/apache/',
     1.6      access_log_file => "access_${logpart}.log",
     1.7 +    access_log_format => "%h %l %u %t \\\"%r\\\" %>s %b \\\"%{Referer}i\\\" \\\"%{User-agent}i\\\" %{Host}i",
     1.8      serveraliases   => $serveraliases,
     1.9      ensure          => $ensure,
    1.10    }
     2.1 --- a/modules/website/manifests/https.pp	Sat Apr 01 10:54:09 2017 +0100
     2.2 +++ b/modules/website/manifests/https.pp	Sun Apr 02 20:09:13 2017 +0100
     2.3 @@ -141,6 +141,7 @@
     2.4      custom_fragment => $custom_conf,
     2.5      logroot         => '/var/log/apache/',
     2.6      access_log_file => "access_${logpart}.log",
     2.7 +    access_log_format => "%h %l %u %t \\\"%r\\\" %>s %b \\\"%{Referer}i\\\" \\\"%{User-agent}i\\\" %{Host}i",
     2.8      error_log_file  => "error_${logpart}.log",
     2.9      serveraliases   => $serveraliases,
    2.10      ssl             => true,
    2.11 @@ -159,6 +160,7 @@
    2.12      serveraliases   => $serveraliases,
    2.13      logroot         => '/var/log/apache/',
    2.14      access_log_file => "access_${logpart}_nossl.log",
    2.15 +    access_log_format => "%h %l %u %t \\\"%r\\\" %>s %b \\\"%{Referer}i\\\" \\\"%{User-agent}i\\\" %{Host}i",
    2.16      error_log_file  => "error_${logpart}_nossl.log",
    2.17    }
    2.18  }
     3.1 --- a/modules/website/manifests/https/redir.pp	Sat Apr 01 10:54:09 2017 +0100
     3.2 +++ b/modules/website/manifests/https/redir.pp	Sun Apr 02 20:09:13 2017 +0100
     3.3 @@ -117,6 +117,7 @@
     3.4      custom_fragment => $custom_conf,
     3.5      logroot         => '/var/log/apache/',
     3.6      access_log_file => "access_${logpart}${log_extra}.log",
     3.7 +    access_log_format => "%h %l %u %t \\\"%r\\\" %>s %b \\\"%{Referer}i\\\" \\\"%{User-agent}i\\\" %{Host}i",
     3.8      error_log_file  => "error_${logpart}${log_extra}.log",
     3.9      serveraliases   => $serveraliases,
    3.10      ssl             => true,
    3.11 @@ -137,6 +138,7 @@
    3.12      serveraliases   => $serveraliases,
    3.13      logroot         => '/var/log/apache/',
    3.14      access_log_file => "access_${logpart}${log_extra}_nossl.log",
    3.15 +    access_log_format => "%h %l %u %t \\\"%r\\\" %>s %b \\\"%{Referer}i\\\" \\\"%{User-agent}i\\\" %{Host}i",
    3.16      error_log_file  => "error_${logpart}${log_extra}_nossl.log",
    3.17    }
    3.18  }