Configure logs in Apache for virtualhost

First of all, let’s distinguish between error logs and access logs.

In this guide you can see how:

But, I noticed that there was not info in the apache /var/log/apache2.access log

The trick is to add one line to the virtualhost that you would like to control:

CustomLog /var/log/apache/ combined



Enabling Apache logs in MAMP Pro

MAMP Pro uses a template to configure the apache configuration file. So you have to open MAMP  Pro and open templates apache, as described here

Then change the lines as explained here

and restart apache!

You will now be able to see the logs in real time using
tail -f /Applications/MAMP/logs/apache_access.log