Provide an alternc LogFormat in any case

We must provide an apache log when any domain are set as an fresh
installaton
This commit is contained in:
km 2017-10-06 18:38:24 +02:00
parent 6b61eff4b1
commit add27f014d
3 changed files with 4 additions and 12 deletions

View File

@ -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
<Directory />
Options FollowSymLinks

View File

@ -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 ) ) {

View File

@ -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"