From 1ce4b4b8855822a61231b92e1bea70e606d7316d Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Sun, 10 Mar 2024 13:07:01 +0000 Subject: [PATCH] mediawiki: add apache request duration logging --- cookbooks/mediawiki/templates/default/apache.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cookbooks/mediawiki/templates/default/apache.erb b/cookbooks/mediawiki/templates/default/apache.erb index 411834ead..31f521fbd 100644 --- a/cookbooks/mediawiki/templates/default/apache.erb +++ b/cookbooks/mediawiki/templates/default/apache.erb @@ -8,7 +8,8 @@ ServerAdmin webmaster@openstreetmap.org - CustomLog /var/log/apache2/<%= @name %>-access.log combined + LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" %Dus" combined_with_time + CustomLog /var/log/apache2/<%= @name %>-access.log combined_with_time ErrorLog /var/log/apache2/<%= @name %>-error.log RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/ @@ -27,7 +28,8 @@ SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key - CustomLog /var/log/apache2/<%= @name %>-secure-access.log combined + LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" %Dus" combined_with_time + CustomLog /var/log/apache2/<%= @name %>-secure-access.log combined_with_time ErrorLog /var/log/apache2/<%= @name %>-secure-error.log DocumentRoot <%= @directory %> -- 2.45.1