From 429039819def9f2738fb5a39b2d420345019693b Mon Sep 17 00:00:00 2001 From: Alexander Weidinger Date: Wed, 3 Jan 2018 02:12:54 +0100 Subject: [PATCH] Fix CustomLog default values in templates --- apache/vhosts/minimal.tmpl | 3 ++- apache/vhosts/proxy.tmpl | 3 ++- apache/vhosts/redirect.tmpl | 3 ++- apache/vhosts/standard.tmpl | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apache/vhosts/minimal.tmpl b/apache/vhosts/minimal.tmpl index 98fab2f..b7372f1 100644 --- a/apache/vhosts/minimal.tmpl +++ b/apache/vhosts/minimal.tmpl @@ -12,8 +12,9 @@ 'LogLevel': site.get('LogLevel', 'warn'), 'ErrorLog': site.get('ErrorLog', '{0}/{1}-error.log'.format(map.logdir, sitename)), - 'CustomLog': site.get('CustomLog', '{0}/{1}-access.log'.format(map.logdir, sitename)), + 'CustomLog': site.get('CustomLog', '{0}/{1}-access.log {1}'.format(map.logdir, sitename)), 'LogFormat': site.get('LogFormat', '"%h %l %u %t \\\"%r\\\" %>s %b"'), + 'LogFormat': site.get('LogFormat', '"%h %l %u %t \\\"%r\\\" %>s %b" {0}'.format(sitename)), 'DocumentRoot': site.get('DocumentRoot', '{0}/{1}'.format(map.wwwdir, sitename)) diff --git a/apache/vhosts/proxy.tmpl b/apache/vhosts/proxy.tmpl index af791a1..f6b79b2 100644 --- a/apache/vhosts/proxy.tmpl +++ b/apache/vhosts/proxy.tmpl @@ -15,7 +15,8 @@ 'LogLevel': site.get('LogLevel', 'warn'), 'ErrorLog': site.get('ErrorLog', '{0}/{1}-error.log'.format(map.logdir, sitename)), 'LogFormat': site.get('LogFormat', '"%a %l %u %t \\"%r\\" %>s %O \\"%{Referer}i\\" \\"%{User-Agent}i\\""'), - 'CustomLog': site.get('CustomLog', '{0}/{1}-access.log'.format(map.logdir, sitename)), + 'LogFormat': site.get('LogFormat', '"%a %l %u %t \\"%r\\" %>s %O \\"%{Referer}i\\" \\"%{User-Agent}i\\"" {0}'.format(sitename)), + 'CustomLog': site.get('CustomLog', '{0}/{1}-access.log {1}'.format(map.logdir, sitename)), 'ProxyRequests': site.get('ProxyRequests', 'Off'), 'ProxyPreserveHost': site.get('ProxyPreserveHost', 'On'), diff --git a/apache/vhosts/redirect.tmpl b/apache/vhosts/redirect.tmpl index 024cf36..d207793 100644 --- a/apache/vhosts/redirect.tmpl +++ b/apache/vhosts/redirect.tmpl @@ -16,7 +16,8 @@ 'LogLevel': site.get('LogLevel', 'warn'), 'ErrorLog': site.get('ErrorLog', '{0}/{1}-error.log'.format(map.logdir, sitename)), 'LogFormat': site.get('LogFormat', '"%h %l %u %t \\\"%r\\\" %>s %O"'), - 'CustomLog': site.get('CustomLog', '{0}/{1}-access.log'.format(map.logdir, sitename)), + 'LogFormat': site.get('LogFormat', '"%h %l %u %t \\\"%r\\\" %>s %O" {0}'.format(sitename)), + 'CustomLog': site.get('CustomLog', '{0}/{1}-access.log {1}'.format(map.logdir, sitename)), 'RedirectSource': site.get('RedirectSource', '/'), 'RedirectTarget': site.get('RedirectTarget', 'https://{0}/'.format(sitename)), diff --git a/apache/vhosts/standard.tmpl b/apache/vhosts/standard.tmpl index d37c796..880721f 100644 --- a/apache/vhosts/standard.tmpl +++ b/apache/vhosts/standard.tmpl @@ -17,7 +17,8 @@ 'LogLevel': site.get('LogLevel', 'warn'), 'ErrorLog': site.get('ErrorLog', '{0}/{1}-error.log'.format(map.logdir, sitename)), 'LogFormat': site.get('LogFormat', '"%h %l %u %t \\\"%r\\\" %>s"'), - 'CustomLog': site.get('CustomLog', '{0}/{1}-access.log'.format(map.logdir, sitename)), + 'LogFormat': site.get('LogFormat', '"%h %l %u %t \\\"%r\\\" %>s" {0}'.format(sitename)), + 'CustomLog': site.get('CustomLog', '{0}/{1}-access.log {1}'.format(map.logdir, sitename)), 'DocumentRoot': site.get('DocumentRoot', '{0}/{1}'.format(map.wwwdir, sitename)), 'VirtualDocumentRoot': site.get('VirtualDocumentRoot'),