From ce49653e21ec2283997367d65e2cae62b993e846 Mon Sep 17 00:00:00 2001 From: Christoph Date: Sun, 2 Jul 2017 03:06:37 +0200 Subject: [PATCH] Add configuration for custom log format file: 000-logformat.conf --- install_httpd-2.4.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/install_httpd-2.4.sh b/install_httpd-2.4.sh index 8ad805e..05a2c16 100755 --- a/install_httpd-2.4.sh +++ b/install_httpd-2.4.sh @@ -3374,6 +3374,34 @@ else fi +## - Add configuration for custom log format file: 000-logformat.conf +## - +echo "## - Add configuration for custom log format file: 000-logformat.conf.." >> ${_logdir}/main.log +echo "## -" >> ${_logdir}/main.log +echo "" +echononl "\tAdd configuration for custom log format file: 000-logformat.conf.." +cat << EOF > ${PREFIX}/conf/vhosts/000-logformat.conf + +## - %a remote IP-address +## - %v ServerName of requested site +## - %{%T %Y-%m-%d}t date time - custom +## - %t date time - apache default +## - %{User-Agent}i user agent +## - %U requested URL +## - %r First line of request. +## - %>s real status code +## - \$T The time taken to serve the request, in seconds +## - +LogFormat "%a %v %p %t %r %>s \"%{User-Agent}i\" %T" base_requests +EOF +if [ "$?" = "0" ]; then + echo_ok +else + echo_failed + warn "Adding config file 000-logformat.conf failed." +fi + + echo "" >> ${_logdir}/main.log echo "## - Create directory ${GLOBAL_DOC_ROOT}.." >> ${_logdir}/main.log echo "## -" >> ${_logdir}/main.log