From add27f014d54a69fd71a86f757ad39908d960e23 Mon Sep 17 00:00:00 2001 From: km Date: Fri, 6 Oct 2017 18:38:24 +0200 Subject: [PATCH] Provide an alternc LogFormat in any case We must provide an apache log when any domain are set as an fresh installaton --- etc/alternc/templates/alternc/apache2.conf | 3 +++ src/generate_apache_conf.php | 4 +--- src/update_domains.sh | 9 --------- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/etc/alternc/templates/alternc/apache2.conf b/etc/alternc/templates/alternc/apache2.conf index afa1649f..514d695d 100644 --- a/etc/alternc/templates/alternc/apache2.conf +++ b/etc/alternc/templates/alternc/apache2.conf @@ -9,6 +9,9 @@ # Define the default user and group for mpm-itk AssignUserId www-data www-data +# Logformat information +Include /etc/alternc/apache_logformat.conf + # Deny access to the root filesystem Options FollowSymLinks diff --git a/src/generate_apache_conf.php b/src/generate_apache_conf.php index 961c5220..579d814e 100755 --- a/src/generate_apache_conf.php +++ b/src/generate_apache_conf.php @@ -49,9 +49,7 @@ if (! $conf) { // Add some headers $conf2 = "###BEGIN OF ALTERNC AUTO-GENERATED FILE - DO NOT EDIT MANUALLY### -# Generation: ".date('Y-m-d H:i:s')." -## LogFormat informations -Include \"/etc/alternc/apache_logformat.conf\""; +# Generation: ".date('Y-m-d H:i:s'); // Do we need to include manual configuration ? if ( is_dir( ALTERNC_VHOST_MANUALCONF ) ) { diff --git a/src/update_domains.sh b/src/update_domains.sh index 6d30f9d3..2b727390 100755 --- a/src/update_domains.sh +++ b/src/update_domains.sh @@ -22,7 +22,6 @@ umask 022 LOCK_FILE="/usr/share/alternc/panel/cron.lock" # FIXME doesn't seem clean to be here OLDIFS="$IFS" NEWIFS=" " -LOGFORMAT_FILE="/etc/alternc/apache_logformat.conf" RELOAD_WEB="$(mktemp /tmp/alternc_reload_web.XXXX)" RELOAD_DNS="$(mktemp /tmp/alternc_reload_dns.XXXX)" B="ยตยตยงยง" # Strange letters to make split in query @@ -130,14 +129,6 @@ if [ ! -z "$(cat "$RELOAD_WEB")" ] ; then ( echo "###BEGIN OF ALTERNC AUTO-GENERATED FILE - DO NOT EDIT MANUALLY###" - # If exists and readable, include conf file "apache_logformat.conf" - # contain LogFormat and CustomLog directives for our Vhosts) - echo "## LogFormat informations" - if [ ! -r "$LOGFORMAT_FILE" ] ; then - echo "## Warning : Cannot read $LOGFORMAT_FILE" - else - echo "Include \"$LOGFORMAT_FILE\"" - fi find "$VHOST_DIR" -mindepth 2 -type f -iname "*.conf" -print0 | xargs -0 cat echo "###END OF ALTERNC AUTO-GENERATED FILE - DO NOT EDIT MANUALLY###" ) > "$tempo"