make access.log file configurable via ENV variable

This commit is contained in:
Alex Phillips
2022-02-03 09:12:39 -05:00
parent 69ac92eded
commit 717c8258f3
3 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -332,7 +332,7 @@ with-mouse false
# Specify the path to the input log file. If set, it will take
# priority over -f from the command line.
#
log-file /config/log/nginx/access.log
#log-file /config/log/nginx/access.log
# Send all debug messages to the specified file.
#
+1
View File
@@ -252,6 +252,7 @@
$geodb = '';
endif;
$access_log = getenv("GOACCESS_LOG_FILE") ?: "/config/log/nginx/access.log";
$goaccess = shell_exec("/usr/local/bin/goaccess -a -o html --config-file=/dashboard/goaccess.conf ".$geodb);
$goaccess = str_replace("<title>Server&nbsp;Statistics", "<title>SWAG&nbsp;Dashboard", $goaccess);
$goaccess = str_replace("<h1 class='h-dashboard'>", "<h1>", $goaccess);