tail is useful utility can display logs in Linux bash. tail -f <filename> will help you to show the recent access continuously, |
Below bash script will help you to monitor httpd_log easily
#!/usr/bin/bash
if [ -z $1 ]
then
echo "======================================================================="
echo "httpd_log - developed by Chun Kang - 2022-07-19"
echo
echo "$0 domain_name"
echo "======================================================================="
echo
sudo tail -f /var/log/httpd/access.log
else
sudo tail -f /var/log/httpd/$1-access.log
fi |