changed format
parent
f268dc2514
commit
afbc2eec18
4
init.sh
4
init.sh
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue