Log files are critical to managing Apache.
Managing these logs can provide advance security warnings, provide detailed information in terms of who is visiting your site and where they are coming from and can help you troubleshoot the use of your server resources. The two main log files are listed below from a Debian Squeeze Server.
The access_log file gives you information on who is using your web server and the error_log provides information for troubleshooting.
How to View Apache2 Logs:
View apache2 logs with tail and head:
The basic tail command will show the tailend of the log.
You can use the -n option to view a specific number of lines like in this example:
tail -n100 /var/log/apache2/access_log
Head is the opposite of tail.