As a developer, there may be times when you need to monitor what is happening on an Apache server as live HTTP requests are coming in from a web page. In a UNIX environment, you can actually accomplish this quite painlessly through the command line, using the tail
and grep
commands. Tail
is a command which outputs the last part of a file and the grep
utility is used for pattern matching.
First, you will want to locate your Apache logs and cd
into that directory. If you are running a local server through MAMP, you can most likely find them in the application folder.
cd /Applications/MAMP/logs(more…)