From: Grant Slater Date: Sun, 10 Mar 2024 13:07:01 +0000 (+0000) Subject: mediawiki: add apache request duration logging X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/1ce4b4b8855822a61231b92e1bea70e606d7316d?hp=8b775e6bdda295c294ece2e2fe362270d1422461 mediawiki: add apache request duration logging --- 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 %>