Hoe to apache log managing in Bash script.
I have configured multiple virtual host in my server. I want to monitor the apache hits in daily basis from each virtual-host.I have written a script for single host log file.But no idea about multiple log files simultaneously.
#!/bin/bash
accesslog=$logrot/access.log-$fileDT
cat $accesslog | grep ^[0-9] | awk '{ print $1 }' | wc -l
Thanks.
|