From acfc563a6c8f469cb8e98c7b681fb9cf821fd476 Mon Sep 17 00:00:00 2001 From: myvesta <38690722+myvesta@users.noreply.github.com> Date: Mon, 14 Oct 2024 17:51:26 +0200 Subject: [PATCH] Logging apache pid in v-make-main-apache-log --- bin/v-make-main-apache-log | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/v-make-main-apache-log b/bin/v-make-main-apache-log index dc1240645..96e91877b 100644 --- a/bin/v-make-main-apache-log +++ b/bin/v-make-main-apache-log @@ -7,7 +7,7 @@ chown root:adm /var/log/apache2/time.log find /home/*/conf/web/ -type f \( -name "apache2.conf" -or -name "sapache2.conf" -or -name "*.apache2.conf" -or -name "*.apache2.ssl.conf" \) -exec grep -L "time\.log" {} \; | xargs sed -i 's|ServerName |CustomLog /var/log/apache2/time.log time\n ServerName |g' find /usr/local/vesta/data/templates/web/apache2 -type f \( -name "*.tpl" -or -name "*.stpl" \) -exec grep -L "time\.log" {} \; | xargs sed -i 's|ServerName |CustomLog /var/log/apache2/time.log time\n ServerName |g' if ! /usr/local/vesta/bin/v-grep 'LogFormat "%t %v %a %D %r %>s \"%{User-Agent}i\"" time' '/etc/apache2/apache2.conf' '-q'; then - sed -i 's|LogFormat "%b" bytes|LogFormat "%b" bytes\nLogFormat "%t %v %a %D %r %>s \\\"%{User-Agent}i\\\"" time|g' /etc/apache2/apache2.conf + sed -i 's|LogFormat "%b" bytes|LogFormat "%b" bytes\nLogFormat "%t %v %a %D %r %>s \\\"%{User-Agent}i\\\" pid=%P" time|g' /etc/apache2/apache2.conf fi systemctl restart apache2