changed format

master
Nicholas Hope 2022-12-28 22:37:10 -05:00
parent f268dc2514
commit afbc2eec18
1 changed files with 3 additions and 1 deletions

View File

@ -10,8 +10,10 @@ FILELOC='/var/www/html'
# set log format
cd $CONFLOC
# remove irrelevant formats
perl -pi -e 's/^LogFormat(?!.* combined)$/# LogFormat/gm' apache2.conf
perl -pi -e 's/^LogFormat.* combined$/LogFormat "%h,%t,%s,%H,%f" combined/gm' apache2.conf
# set used one to IP,YYMMDD hhmmss TIMEZONE,STATUS,METHOD,FILE
perl -pi -e 's;^LogFormat.* combined$;LogFormat "%h,%\{%y/%m/%d %H:%M:%S %z\}t,%s,%m,%f" combined;gm' apache2.conf
function createfile {
# usage: createfile FILENAME