From c6f148eef497bcecfed9e9a67993379319c0590c Mon Sep 17 00:00:00 2001 From: root Date: Tue, 25 Dec 2018 14:43:05 +0100 Subject: [PATCH] Updates in install scripts --- setup/functions | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/setup/functions b/setup/functions index 167b27b8..dca23a61 100644 --- a/setup/functions +++ b/setup/functions @@ -5,6 +5,7 @@ case "$hostType" in hostTypeLabel="CentOS 7" redisService=redis apacheConf="/etc/httpd/conf.d/mailtrain.conf" + apacheLogsPath="logs" if hash firewall-cmd 2>/dev/null; then firewallCmdExists=yes @@ -15,6 +16,7 @@ case "$hostType" in hostTypeLabel="Ubuntu 18.04 LTS" redisService=redis-server apacheConf="/etc/apache2/conf-available/mailtrain.conf" + apacheLogsPath="/var/log/apache2" if hash ufw 2>/dev/null; then firewallCmdExists=yes @@ -271,7 +273,7 @@ function installHttpsProxy { RewriteEngine On RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent] - ErrorLog logs/${hostTrusted}_redirect_error.log + ErrorLog ${apacheLogsPath}/${hostTrusted}_redirect_error.log LogLevel warn @@ -283,7 +285,7 @@ function installHttpsProxy { RewriteEngine On RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent] - ErrorLog logs/${hostSandbox}_redirect_error.log + ErrorLog ${apacheLogsPath}/${hostSandbox}_redirect_error.log LogLevel warn @@ -295,14 +297,14 @@ function installHttpsProxy { RewriteEngine On RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent] - ErrorLog logs/${hostPublic}_redirect_error.log + ErrorLog ${apacheLogsPath}/${hostPublic}_redirect_error.log LogLevel warn ServerName ${hostTrusted}:${portTrusted} - ErrorLog logs/${hostTrusted}_ssl_error.log + ErrorLog ${apacheLogsPath}/${hostTrusted}_ssl_error.log TransferLog logs/${hostTrusted}_ssl_access.log LogLevel warn @@ -319,7 +321,7 @@ function installHttpsProxy { ServerName ${hostSandbox}:${portSandbox} - ErrorLog logs/${hostSandbox}_ssl_error.log + ErrorLog ${apacheLogsPath}/${hostSandbox}_ssl_error.log TransferLog logs/${hostSandbox}_ssl_access.log LogLevel warn @@ -336,7 +338,7 @@ function installHttpsProxy { ServerName ${hostPublic}:${portPublic} - ErrorLog logs/${hostPublic}_ssl_error.log + ErrorLog ${apacheLogsPath}/${hostPublic}_ssl_error.log TransferLog logs/${hostPublic}_ssl_access.log LogLevel warn